mul..va 14 years ago
parent 64a404a939
commit d758929f15
  1. 4
      engine/src/core-data/Common/MatDefs/Post/Posterization.frag

@ -9,9 +9,9 @@ void main() {
vec4 texVal = texture2D(m_Texture, texCoord); vec4 texVal = texture2D(m_Texture, texCoord);
texVal = pow(texVal, vec4(m_Gamma)); texVal = pow(texVal, vec4(m_Gamma));
texVal = texVal * m_NumColors; texVal = texVal * vec4(m_NumColors);
texVal = floor(texVal); texVal = floor(texVal);
texVal = texVal / m_NumColors; texVal = texVal / vec4(m_NumColors);
texVal = pow(texVal, vec4(1.0/m_Gamma)); texVal = pow(texVal, vec4(1.0/m_Gamma));
gl_FragColor = mix(texture2D(m_Texture, texCoord), texVal, m_Strength); gl_FragColor = mix(texture2D(m_Texture, texCoord), texVal, m_Strength);

Loading…
Cancel
Save