debug: simple diffuse fragment shader to test point light UBO
This commit is contained in:
@@ -86,6 +86,7 @@ internal sealed unsafe class VulkanRenderer : IRenderer, Engine.Graphics.IScreen
|
||||
{
|
||||
lightPos = new Vector4(lt.Position, l.Intensity);
|
||||
lightColor = new Vector4(l.Color, l.Range);
|
||||
Console.WriteLine($"[Vulkan] Point light: pos={lt.Position}, intensity={l.Intensity}, range={l.Range}, color={l.Color}");
|
||||
}
|
||||
});
|
||||
if (lightPos.W == 0)
|
||||
@@ -96,9 +97,14 @@ internal sealed unsafe class VulkanRenderer : IRenderer, Engine.Graphics.IScreen
|
||||
{
|
||||
lightPos = new Vector4(l.Position, l.Intensity);
|
||||
lightColor = new Vector4(l.Color, l.Range);
|
||||
Console.WriteLine($"[Vulkan] Point light (fallback): pos={l.Position}, intensity={l.Intensity}");
|
||||
}
|
||||
});
|
||||
}
|
||||
if (lightPos.W == 0)
|
||||
{
|
||||
Console.WriteLine("[Vulkan] WARNING: No point light found in ECS!");
|
||||
}
|
||||
|
||||
// Pack UBO: mat4 vp (64 bytes) + vec4 lightPos (16) + vec4 lightColor (16) = 96 bytes
|
||||
var uboData = stackalloc byte[128];
|
||||
|
||||
Reference in New Issue
Block a user