diff options
author | Omniscient <omniscient.oce@gmail.com> | 2024-06-15 22:20:15 +1000 |
---|---|---|
committer | Omniscient <omniscient.oce@gmail.com> | 2024-06-15 22:20:15 +1000 |
commit | d52654dfdbe16345023fed4c61261dc4c66b96fe (patch) | |
tree | 49b9dc298ec8d01533c13c909d827f96192551a1 /assets/shaders/pbr_params.vert | |
parent | b3b19f081231c7c13322c7b0d577afb6084d48df (diff) |
trying to figure out uniform structs..
Diffstat (limited to 'assets/shaders/pbr_params.vert')
-rw-r--r-- | assets/shaders/pbr_params.vert | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/assets/shaders/pbr_params.vert b/assets/shaders/pbr_params.vert index e3cbe96..01379d7 100644 --- a/assets/shaders/pbr_params.vert +++ b/assets/shaders/pbr_params.vert @@ -19,7 +19,8 @@ layout(location = 2) out vec2 fragTexCoords; void main() { fragWorldPos = vec3(mvp.model * vec4(inPosition, 1.0)); - // TODO: fragNormal + mat3 normalMatrix = transpose(inverse(mat3(mvp.model))); + fragNormal = normalMatrix * inNormal; fragTexCoords = inTexCoords; gl_Position = mvp.proj * mvp.view * mvp.model * vec4(inPosition, 1.0); |