summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorOmni <omniscient.oce@gmail.com>2024-06-22 16:23:34 +1000
committerOmni <omniscient.oce@gmail.com>2024-06-22 16:23:34 +1000
commita40a52ab3c827ff08f502f8163358d0faacf9b13 (patch)
treee9c241f109a2f23272be9d4281a38f3d4c8824e9 /assets
parent347b3020cdd121a90dd49164c5e8c0de99027624 (diff)
add layout location tags to vertex attributes in pbr_params
Diffstat (limited to 'assets')
-rw-r--r--assets/shaders/pbr_params.frag8
-rw-r--r--assets/shaders/pbr_params.vert1
2 files changed, 4 insertions, 5 deletions
diff --git a/assets/shaders/pbr_params.frag b/assets/shaders/pbr_params.frag
index ae4c1d2..7dbdc9d 100644
--- a/assets/shaders/pbr_params.frag
+++ b/assets/shaders/pbr_params.frag
@@ -2,9 +2,9 @@
out vec4 FragColor;
-in vec3 fragWorldPos;
-in vec3 fragNormal;
-in vec2 fragTexCoords;
+layout(location = 0) in vec3 fragWorldPos;
+layout(location = 1) in vec3 fragNormal;
+layout(location = 2) in vec2 fragTexCoords;
struct PointLight {
vec4 position;
@@ -82,7 +82,7 @@ void main() {
FragColor = vec4(color, 1.0);
// FragColor = vec4(scene.pointLights[0].position);
- // FragColor = vec4(fragNormal, 1.0);
+ //FragColor = vec4(fragNormal, 1.0);
// FragColor = vec4(pbr.metallic, pbr.roughness, pbr.ao, 1.0);
// FragColor = scene.viewPos;
}
diff --git a/assets/shaders/pbr_params.vert b/assets/shaders/pbr_params.vert
index 40a6f29..01d0cfe 100644
--- a/assets/shaders/pbr_params.vert
+++ b/assets/shaders/pbr_params.vert
@@ -20,7 +20,6 @@ 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;
fragTexCoords = inTexCoords;