Watch
2
0
Fork
You've already forked raylib-cs
0

Fix PBR do not work

This commit is contained in:
MrScautHD 2024-02-08 22:27:13 +01:00
commit 1fac1c5d50
2 changed files with 19 additions and 13 deletions

View file

@ -198,13 +198,21 @@ public class BasicPbr
// Draw spheres to show the lights positions
for (int i = 0; i < 4; i++)
{
var color = lights[i].Color;
var lightColor = new Color(
(byte)(color.X * 255),
(byte)(color.Y * 255),
(byte)(color.Z * 255),
(byte)(color.W * 255)
);
if (lights[i].Enabled)
{
DrawSphereEx(lights[i].Position, 0.2f, 8, 8, lights[i].Color);
DrawSphereEx(lights[i].Position, 0.2f, 8, 8, lightColor);
}
else
{
DrawSphereWires(lights[i].Position, 0.2f, 8, 8, ColorAlpha(lights[i].Color, 0.3f));
DrawSphereWires(lights[i].Position, 0.2f, 8, 8, ColorAlpha(lightColor, 0.3f));
}
}