Update mad_world.glsl
This commit is contained in:
parent
51b0645963
commit
134fdd0ef7
|
@ -7,16 +7,20 @@ uniform vec4 resolution;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
float4 emboss = (texture(samp9, uv0+resolution.zw) - texture(samp9, uv0-resolution.zw))*2.0;
|
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);
|
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;
|
float4 color = texture(samp9, uv0).rgba;
|
||||||
if (color.r > 0.8 && color.b + color.b < 0.2)
|
|
||||||
ocol0 = float4(1,0,0,0);
|
if (color.r > 0.8 && color.b + color.b < 0.2)
|
||||||
else {
|
{
|
||||||
color += emboss;
|
ocol0 = float4(1,0,0,0);
|
||||||
if (dot(color.rgb, float3(0.3, 0.5, 0.2)) > 0.5)
|
}
|
||||||
ocol0 = float4(1,1,1,1);
|
else
|
||||||
else
|
{
|
||||||
ocol0 = float4(0,0,0,0);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue