feat: add forward+ rendering

This commit is contained in:
2026-10-11 00:12:23 +02:00
parent c96b2282fb
commit 4bf87bd91b
26 changed files with 1346 additions and 191 deletions
+2 -2
View File
@@ -10,7 +10,6 @@ layout(location = 0) out vec4 outColor;
layout(push_constant) uniform SkyboxPC {
mat4 invViewProj;
vec4 skyboxRot[3];
vec3 cameraPos;
uint skyboxTextureId;
} pcs;
@@ -22,7 +21,8 @@ void main()
vec4 world = pcs.invViewProj * ndc;
vec3 worldPos = world.xyz / world.w;
vec3 dir = normalize(worldPos - pcs.cameraPos);
// invViewProj has no translation, so the camera sits at the origin
vec3 dir = normalize(worldPos);
dir.y *= -1.0;
mat3 skyboxRot = mat3(