From d758929f150ae0f50a3134817270301bf09e7741 Mon Sep 17 00:00:00 2001 From: "mul..va" Date: Sun, 20 Mar 2011 12:13:49 +0000 Subject: [PATCH] URL: http://jmonkeyengine.org/groups/contribution-depot-jme3/forum/topic/posterizationfilter-shader-fix-for-mac/ PosterizationFilter compilation error fix for Mac git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7058 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core-data/Common/MatDefs/Post/Posterization.frag | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/core-data/Common/MatDefs/Post/Posterization.frag b/engine/src/core-data/Common/MatDefs/Post/Posterization.frag index 4ec01e4ea..d184bc6f3 100644 --- a/engine/src/core-data/Common/MatDefs/Post/Posterization.frag +++ b/engine/src/core-data/Common/MatDefs/Post/Posterization.frag @@ -9,9 +9,9 @@ void main() { vec4 texVal = texture2D(m_Texture, texCoord); texVal = pow(texVal, vec4(m_Gamma)); - texVal = texVal * m_NumColors; + texVal = texVal * vec4(m_NumColors); texVal = floor(texVal); - texVal = texVal / m_NumColors; + texVal = texVal / vec4(m_NumColors); texVal = pow(texVal, vec4(1.0/m_Gamma)); gl_FragColor = mix(texture2D(m_Texture, texCoord), texVal, m_Strength);