feat: add forward+ rendering
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user