mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
bc9ef95643
In the cases where we support the binding layout keyword, use it for more than binding UBO location. This changes it so it is supported for samplers as well. Instances when this is enabled is if a device supports GL_ARB_shading_language_420pack, or if it supports GLES 3.10.
27 lines
599 B
GLSL
27 lines
599 B
GLSL
SAMPLER_BINDING(9) uniform sampler2D samp9;
|
|
|
|
out vec4 ocol0;
|
|
in vec2 uv0;
|
|
|
|
uniform vec4 resolution;
|
|
|
|
void main()
|
|
{
|
|
float4 emboss = (texture(samp9, uv0+resolution.zw) - texture(samp9, uv0-resolution.zw))*2.0;
|
|
emboss -= (texture(samp9, uv0+float2(1,-1)*resolution.zw).rgba - texture(samp9, uv0+float2(-1,1)*resolution.zw).rgba);
|
|
float4 color = texture(samp9, uv0).rgba;
|
|
|
|
if (color.r > 0.8 && color.b + color.b < 0.2)
|
|
{
|
|
ocol0 = float4(1,0,0,0);
|
|
}
|
|
else
|
|
{
|
|
color += emboss;
|
|
if (dot(color.rgb, float3(0.3, 0.5, 0.2)) > 0.5)
|
|
ocol0 = float4(1,1,1,1);
|
|
else
|
|
ocol0 = float4(0,0,0,0);
|
|
}
|
|
}
|