dolphin/Data/Sys/Shaders/mad_world.glsl

20 lines
563 B
Plaintext
Raw Normal View History

2013-03-07 19:51:57 +01:00
void main()
2011-01-31 01:08:06 +01:00
{
float4 emboss = (SampleLocation(GetCoordinates()+GetInvResolution()) - SampleLocation(GetCoordinates()-GetInvResolution()))*2.0;
emboss -= (SampleLocation(GetCoordinates()+float2(1,-1)*GetInvResolution()).rgba - SampleLocation(GetCoordinates()+float2(-1,1)*GetInvResolution()).rgba);
float4 color = Sample();
2014-05-21 05:52:32 +02:00
if (color.r > 0.8 && color.b + color.b < 0.2)
{
SetOutput(float4(1,0,0,0));
2014-05-21 05:52:32 +02:00
}
else
{
color += emboss;
if (dot(color.rgb, float3(0.3, 0.5, 0.2)) > 0.5)
SetOutput(float4(1,1,1,1));
2014-05-21 05:52:32 +02:00
else
SetOutput(float4(0,0,0,0));
2014-05-21 05:52:32 +02:00
}
}