2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-09-09 03:01:41 -04:00

Fix PBR do not work

This commit is contained in:
MrScautHD
2024-02-08 22:27:13 +01:00
parent e8d9746e21
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));
}
}