Mercurial > touhou
diff 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 |
line wrap: on
line diff
--- a/pytouhou/ui/opengl/shaders/eosd.py +++ b/pytouhou/ui/opengl/shaders/eosd.py @@ -78,7 +78,7 @@ class BackgroundShader(Shader): { vec4 temp_color = texture2D(color_map, texcoord) * color; float depth = gl_FragCoord.z / gl_FragCoord.w; - float fog_density = clamp((fog_end - depth) * fog_scale, 0.0f, 1.0f); + float fog_density = clamp((fog_end - depth) * fog_scale, 0.0, 1.0); gl_FragColor = vec4(mix(fog_color, temp_color, fog_density).rgb, temp_color.a); } '''])