diff --git a/shader.glsl b/shader.glsl index fc0d5ba..85dd43d 100644 --- a/shader.glsl +++ b/shader.glsl @@ -112,12 +112,12 @@ void CoolSphere( out vec4 fragColor, in vec2 fragCoord ) // raymarch vec3 col = raymarch(ro,rd,tmm); - if (tmm.x<0.)col = texture(texture_sampler, rd).rgb; + if (tmm.x<0.)col = texture2D(texture_sampler, rd).rgb; else { vec3 nor=(ro+tmm.x*rd)/2.; nor = reflect(rd, nor); float fre = pow(.5+ clamp(dot(nor,rd),0.0,1.0), 3. )*1.3; - col += texture(texture_sampler, nor).rgb * fre; + col += texture2D(texture_sampler, nor).rgb * fre; } @@ -306,7 +306,7 @@ void main(void) vec2 texttop = vec2(0., -.35), pt = (gl_FragCoord.xy / resolution) - texttop; if (pt.y > 0.) - l = gl_FragColor + texture(texts, pt); + l = gl_FragColor + texture2D(texts, pt); gl_FragColor = vec4(l * (1.0), 1.0);