Blame view

res/shaders/hurt_self.frag 493 Bytes
9f1cb386   dangge   auto package
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  #ifdef GL_ES
  precision mediump float;
  #endif
  
  varying vec4 v_fragmentColor;
  varying vec2 v_texCoord;
  uniform sampler2D u_texture;
  
  void main()
  {
      vec4 normalColor = v_fragmentColor * texture2D(u_texture, v_texCoord);
      if(normalColor.a > 0.0)
      {
      	normalColor.r = (1.0 - normalColor.r) * 0.9 + normalColor.r;
      	normalColor.g = (1.0 - normalColor.g) * 0.9 + normalColor.g;
      	normalColor.b = (1.0 - normalColor.b) * 0.9 + normalColor.b;
      }
      gl_FragColor = normalColor;
  }