From 2eca2f0bdd92291859c21fd0f090b0137c45025f Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Fri, 16 Sep 2011 22:22:07 +0000 Subject: [PATCH] - fix some int * float errors in Parallax.glsllib, still crashing on mac due to lines 39/42 com.jme3.renderer.RendererException: compile error in:ShaderSource[name=Common/MatDefs/Light/Lighting.frag, defines, type=Fragment] error:ERROR: 0:45: Call to undeclared function 'texture2DLod' git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8260 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core-data/Common/ShaderLib/Parallax.glsllib | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/src/core-data/Common/ShaderLib/Parallax.glsllib b/engine/src/core-data/Common/ShaderLib/Parallax.glsllib index 2eacbde44..61b9d4b8f 100644 --- a/engine/src/core-data/Common/ShaderLib/Parallax.glsllib +++ b/engine/src/core-data/Common/ShaderLib/Parallax.glsllib @@ -16,14 +16,14 @@ vec3 eyeDir = normalize(vViewDir).xyz; - float nMinSamples = 6; - float nMaxSamples = 1000 * parallaxScale; + float nMinSamples = 6.0; + float nMaxSamples = 1000.0 * parallaxScale; float nNumSamples = mix( nMinSamples, nMaxSamples, 1.0 - eyeDir.z ); //In reference shader: int nNumSamples = (int)(lerp( nMinSamples, nMaxSamples, dot( eyeDirWS, N ) )); float fStepSize = 1.0 / nNumSamples; float fCurrHeight = 0.0; float fPrevHeight = 1.0; float fNextHeight = 0.0; - float nStepIndex = 0; + float nStepIndex = 0.0; vec2 vTexOffsetPerStep = fStepSize * vParallaxOffsetTS; vec2 vTexCurrentOffset = texCoord; float fCurrentBound = 1.0;