From d2c266dd1dfe9ca3497e9b8966ac0086c3d4da62 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Sat, 3 Dec 2022 13:25:29 -0700 Subject: basic.frag -> version 400 to avoid compile erros on Intel --- shaders/basic.frag | 6 +++--- 1 file 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)) ; -- cgit