Shaders
This commit is contained in:
parent
8d31b13da7
commit
d58cabe658
|
@ -10,11 +10,10 @@ void main() {
|
|||
|
||||
vec3 ambientFactor = ambientLight;
|
||||
vec3 lambertFactor = max(vec3(0.0,0.0,0.0), dot(directionnalLight, fNormal) * directionnalLightFactor);
|
||||
|
||||
vec4 texel = texture2D(tex, gl_TexCoord[0].xy);
|
||||
vec4 noTexColor = vec4(ambientFactor + lambertFactor, 1.0);
|
||||
|
||||
vec4 color = texture2D(tex,gl_TexCoord[0].st);
|
||||
vec4 color = texture2D(tex, gl_TexCoord[0].st);
|
||||
|
||||
vec4 fragColor = noTexColor * color;
|
||||
gl_FragColor = fragColor;
|
||||
|
||||
|
|
|
@ -2,7 +2,9 @@ varying vec3 fNormal;
|
|||
varying vec4 fTexCoord;
|
||||
|
||||
void main() {
|
||||
|
||||
fNormal = gl_Normal;
|
||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
|
||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue