fixed gl2 shader

This commit is contained in:
aap 2020-08-03 19:16:23 +02:00
parent 9fbe9b83ba
commit 26a5502ee1
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ main(void)
vec4 envColor = max(pass1, u_colorClamp);
pass1 *= texture2D(tex0, vec2(v_tex0.x, 1.0-v_tex0.y));
vec4 pass2 = envColor*u_coefficient*texture2D(tex1, vec2(v_tex1.x, 1.0-v_tex1.y));
vec4 pass2 = envColor*shininess*texture2D(tex1, vec2(v_tex1.x, 1.0-v_tex1.y));
pass1.rgb = mix(u_fogColor.rgb, pass1.rgb, v_fog);
pass2.rgb = mix(vec3(0.0, 0.0, 0.0), pass2.rgb, v_fog);

View File

@ -54,7 +54,7 @@ const char *matfx_env_frag_src =
" vec4 envColor = max(pass1, u_colorClamp);\n"
" pass1 *= texture2D(tex0, vec2(v_tex0.x, 1.0-v_tex0.y));\n"
" vec4 pass2 = envColor*u_coefficient*texture2D(tex1, vec2(v_tex1.x, 1.0-v_tex1.y));\n"
" vec4 pass2 = envColor*shininess*texture2D(tex1, vec2(v_tex1.x, 1.0-v_tex1.y));\n"
" pass1.rgb = mix(u_fogColor.rgb, pass1.rgb, v_fog);\n"
" pass2.rgb = mix(vec3(0.0, 0.0, 0.0), pass2.rgb, v_fog);\n"