diff options
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); |