mad_world.glsl 591 B

12345678910111213141516171819202122
  1. uniform sampler2D samp9;
  2. out vec4 ocol0;
  3. in vec2 uv0;
  4. uniform vec4 resolution;
  5. void main()
  6. {
  7. float4 emboss = (texture(samp9, uv0+resolution.zw) - texture(samp9, uv0-resolution.zw))*2.0;
  8. emboss -= (texture(samp9, uv0+float2(1,-1)*resolution.zw).rgba - texture(samp9, uv0+float2(-1,1)*resolution.zw).rgba);
  9. float4 color = texture(samp9, uv0).rgba;
  10. if (color.r > 0.8 && color.b + color.b < 0.2)
  11. ocol0 = float4(1,0,0,0);
  12. else {
  13. color += emboss;
  14. if (dot(color.rgb, float3(0.3, 0.5, 0.2)) > 0.5)
  15. ocol0 = float4(1,1,1,1);
  16. else
  17. ocol0 = float4(0,0,0,0);
  18. }
  19. }