aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shaders/basic.frag6
1 files changed, 3 insertions, 3 deletions
diff --git a/shaders/basic.frag b/shaders/basic.frag
index 61e57bf..273efdc 100644
--- a/shaders/basic.frag
+++ b/shaders/basic.frag
@@ -1,4 +1,4 @@
-#version 150
+#version 400
#extension GL_ARB_explicit_attrib_location : enable
#extension GL_ARB_explicit_uniform_location : enable
@@ -24,7 +24,7 @@ in vec4 position ;
flat in int texidx ;
-vec3 sample(float xc,float yc) {
+vec3 sample_tex(float xc,float yc) {
vec3 color = vec3(0);
for ( int i = 0 ; i < 8 ; ++ i ) {
vec4 tmp = texture2D(textures[i], texcoord + vec2(xc,yc)) ;
@@ -78,7 +78,7 @@ void main() {
down = normalize(cross( normal, right ) );
vec3 newNorm = calNormChange(normal,down,right) ;
- vec3 color = sample(0,0) ;
+ vec3 color = sample_tex(0,0) ;
float prod = dot( normalize(-newNorm), normalize(vec3(lightPos - position)));
vec3 intensity = vec3(prod,prod,max(prod,0.4)) ;