summaryrefslogtreecommitdiff
path: root/data/shaders/pbr/pbr-vert.glsl
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2018-09-07 09:03:43 -0400
committerDavid Thompson <dthompson2@worcester.edu>2018-09-07 09:03:43 -0400
commitc4abe6974c5ee78681a8116a83fffe406e30c1aa (patch)
tree720a1478678c666563537b2eb772d72e44321ef1 /data/shaders/pbr/pbr-vert.glsl
parentea398a4ab1d8935e514f40ad3c2e824fe76ae947 (diff)
render: scene: Apply base color texture and factor.
* chickadee/render/scene.scm (draw-primitive): Set base color texture and send base color factor as uniform to shader. * data/shaders/pbr/pbr-vert.glsl (texcoord_0): New input attribute. (frag_tex): New output attribute. * data/shaders/pbr/pbr-frag.glsl (frag_tex): New input attribute. (base_color_factor, base_color_texture): New uniforms.
Diffstat (limited to 'data/shaders/pbr/pbr-vert.glsl')
-rw-r--r--data/shaders/pbr/pbr-vert.glsl3
1 files changed, 3 insertions, 0 deletions
diff --git a/data/shaders/pbr/pbr-vert.glsl b/data/shaders/pbr/pbr-vert.glsl
index 938f475..b6fefef 100644
--- a/data/shaders/pbr/pbr-vert.glsl
+++ b/data/shaders/pbr/pbr-vert.glsl
@@ -1,8 +1,11 @@
#version 130
in vec3 position;
+in vec2 texcoord_0;
+out vec2 frag_tex;
uniform mat4 mvp;
void main(void) {
+ frag_tex = texcoord_0;
gl_Position = mvp * vec4(position.xyz, 1.0);
}