2
0
Эх сурвалжийг харах

- 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

nor..67 14 жил өмнө
parent
commit
2eca2f0bdd

+ 3 - 3
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;