mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
Improved the opacity shader.
This commit is contained in:
parent
a34bc45e56
commit
d1adb313e6
|
@ -28,9 +28,8 @@ varying vec2 vTexCoord;
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec4 color = texture2D(myTexture, vTexCoord);
|
vec4 color = texture2D(myTexture, vTexCoord);
|
||||||
float alpha = clamp(color.a-(1-opacity), 0.0, 1.0);
|
|
||||||
|
|
||||||
gl_FragColor = vec4(color.rgb, alpha);
|
gl_FragColor = vec4(color.rgb, color.a * opacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue