diff options
author | Omniscient <omniscient.oce@gmail.com> | 2024-06-18 11:03:52 +1000 |
---|---|---|
committer | Omniscient <omniscient.oce@gmail.com> | 2024-06-18 11:03:52 +1000 |
commit | b2c9782ab2f4abec8f8548e667a8f2ad6e36bd4b (patch) | |
tree | 34973f37f585439357a5e455225d272e9398a742 /assets | |
parent | 4b5695ce26a8f821dfac987e8e11a6ba5eeff610 (diff) |
wip
Diffstat (limited to 'assets')
-rw-r--r-- | assets/shaders/pbr_textured.frag | 6 | ||||
-rw-r--r-- | assets/shaders/pbr_textured.vert | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/assets/shaders/pbr_textured.frag b/assets/shaders/pbr_textured.frag index 132c449..29d59a0 100644 --- a/assets/shaders/pbr_textured.frag +++ b/assets/shaders/pbr_textured.frag @@ -87,12 +87,12 @@ void main() { color = color / (color + vec3(1.0)); color = pow(color, vec3(1.0/2.2)); - FragColor = vec4(color, 1.0); + // FragColor = vec4(color, 1.0); // FragColor = vec4(1.0); // FragColor = vec4(scene.pointLights[0].position); - FragColor = vec4(albedo, 1.0); + // FragColor = vec4(albedo, 1.0); // FragColor = vec4(pbr.metallic, pbr.roughness, pbr.ao, 1.0); - // FragColor = scene.viewPos; + FragColor = vec4(fragTexCoords, 0.0, 1.0); } /* The below are from https://learnopengl.com/PBR/Lighting */ diff --git a/assets/shaders/pbr_textured.vert b/assets/shaders/pbr_textured.vert index 40a6f29..d0f8fd5 100644 --- a/assets/shaders/pbr_textured.vert +++ b/assets/shaders/pbr_textured.vert @@ -19,9 +19,7 @@ layout(location = 2) out vec2 fragTexCoords; void main() { fragWorldPos = vec3(mvp.model * vec4(inPosition, 1.0)); - fragNormal = mat3(transpose(inverse(mvp.model))) * inNormal; - // fragNormal = inNormal; - + fragNormal = mat3(transpose(inverse(mvp.model))) * inNormal; // world-space normal fragTexCoords = inTexCoords; gl_Position = mvp.proj * mvp.view * mvp.model * vec4(inPosition, 1.0); |