diff options
author | sanine-a <sanine.not@pm.me> | 2020-05-23 12:36:13 -0500 |
---|---|---|
committer | sanine-a <sanine.not@pm.me> | 2020-05-23 12:36:13 -0500 |
commit | 86bd56a8983b664e145ddd3b34a2c2fa8bdf21a9 (patch) | |
tree | 04b7571e2fc6ef3d7c91ac1fe6c28c4290fd8fff /demo.fs | |
parent | 018b7ce3f7d94af92fa4fab32ffdde451da7fcb9 (diff) |
add normals to primitives
Diffstat (limited to 'demo.fs')
-rw-r--r-- | demo.fs | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -2,16 +2,14 @@ in vec2 texture_coordinate; -uniform vec3 extra_color; +uniform vec3 light_color; uniform sampler2D box_texture; uniform sampler2D happy_texture; -out vec4 FragColor; +out vec4 fragment_color; void main() { - FragColor = mix(texture(box_texture, texture_coordinate), - texture(happy_texture, texture_coordinate), - 0.2); + fragment_color = texture(box_texture, texture_coordinate) * vec4(light_color.xyz, 1.0); } |