OSDN Git Service

URL: http://jmonkeyengine.org/groups/contribution-depot-jme3/forum/topic/posterizatio...
authormulova <mulova@75d07b2b-3a1a-0410-a2c5-0572b91ccdca>
Sun, 20 Mar 2011 12:13:49 +0000 (12:13 +0000)
committermulova <mulova@75d07b2b-3a1a-0410-a2c5-0572b91ccdca>
Sun, 20 Mar 2011 12:13:49 +0000 (12:13 +0000)
PosterizationFilter compilation error fix for Mac

git-svn-id: http://jmonkeyengine.googlecode.com/svn/trunk@7058 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

engine/src/core-data/Common/MatDefs/Post/Posterization.frag

index 4ec01e4..d184bc6 100644 (file)
@@ -9,9 +9,9 @@ void main() {
     vec4 texVal = texture2D(m_Texture, texCoord);\r
  \r
     texVal = pow(texVal, vec4(m_Gamma));\r
-    texVal = texVal * m_NumColors;\r
+    texVal = texVal * vec4(m_NumColors);\r
     texVal = floor(texVal);\r
-    texVal = texVal / m_NumColors;\r
+    texVal = texVal / vec4(m_NumColors);\r
     texVal = pow(texVal, vec4(1.0/m_Gamma));\r
  \r
     gl_FragColor = mix(texture2D(m_Texture, texCoord), texVal, m_Strength);\r