fix: move light data from UBO to push constants — fixes std140 layout issue
Root cause: GLSL std140 layout adds padding after mat4 for vec4 fields, causing light data to be read at wrong offsets → NaN/artifacts. Fix: - UBO back to 64 bytes (mat4 vp only) - Light data (pos + color, 32 bytes) sent via push constants at offset 64 - Two push constant ranges: Vertex (0-64, model) + Fragment (64-96, light) - Both vertex and fragment shaders read from same push_constant block - PBR shader fully restored with Cook-Torrance BRDF - Dynamic point light follows physics ball
This commit is contained in:
Binary file not shown.
Reference in New Issue
Block a user