1
0
Fork 0
This repository has been archived on 2024-04-23. You can view files and clone it, but cannot push or open issues or pull requests.
Global-Gam-Jam-2017/res/shaders/main.frag

14 lines
435 B
GLSL
Raw Normal View History

2017-01-14 19:40:44 +01:00
#version 150
2017-01-14 19:32:47 +01:00
//Il ny a pas de layout(location=i) dans OpenGL < 3.3, mais tu peux utiliser glFragData[i] = myvalue à la place.
2017-01-14 14:02:13 +01:00
uniform sampler2D materialTex;
uniform vec4 color;
in vec2 fragTexCoord;
in vec3 fragVert;
2017-01-14 19:40:44 +01:00
//layout(location = 0) out vec4 finalColor;
2017-01-14 20:10:33 +01:00
// https://learnopengl.com/#!Lighting/Multiple-lights pour le lighing en cas de besoin
2017-01-14 14:02:13 +01:00
void main() {
2017-01-14 19:40:44 +01:00
gl_FragData[0] = texture(materialTex, fragTexCoord) * color;
2017-01-14 14:02:13 +01:00
}