comparison pytouhou/ui/opengl/shaders/eosd.py @ 559:1be60813f7cb

Get OpenGL ES 2.0 to work thanks to libepoxy. PCB textures will need swizzle in the shaders since BGRA isn’t natively supported on GLES.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 30 May 2014 16:40:36 +0200
parents 0f2af7552462
children aca9551ee8b4
comparison
equal deleted inserted replaced
558:94725968dabb 559:1be60813f7cb
76 76
77 void main() 77 void main()
78 { 78 {
79 vec4 temp_color = texture2D(color_map, texcoord) * color; 79 vec4 temp_color = texture2D(color_map, texcoord) * color;
80 float depth = gl_FragCoord.z / gl_FragCoord.w; 80 float depth = gl_FragCoord.z / gl_FragCoord.w;
81 float fog_density = clamp((fog_end - depth) * fog_scale, 0.0f, 1.0f); 81 float fog_density = clamp((fog_end - depth) * fog_scale, 0.0, 1.0);
82 gl_FragColor = vec4(mix(fog_color, temp_color, fog_density).rgb, temp_color.a); 82 gl_FragColor = vec4(mix(fog_color, temp_color, fog_density).rgb, temp_color.a);
83 } 83 }
84 ''']) 84 '''])
85 85
86 86