• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#import "Common/ShaderLib/MultiSample.glsllib"
2
3uniform COLORTEXTURE m_Texture;
4in vec2 texCoord;
5
6uniform int m_NumColors;
7uniform float m_Gamma;
8uniform float m_Strength;
9
10void main() {
11    vec4 texVal = getColor(m_Texture, texCoord);
12
13    texVal = pow(texVal, vec4(m_Gamma));
14    texVal = texVal * m_NumColors;
15    texVal = floor(texVal);
16    texVal = texVal / m_NumColors;
17    texVal = pow(texVal, vec4(1.0/m_Gamma));
18
19    gl_FragColor = mix(getColor(m_Texture, texCoord), texVal, m_Strength);
20}