- 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
3.0
nor..67 13 years ago
parent aaa7042266
commit 2eca2f0bdd
  1. 6
      engine/src/core-data/Common/ShaderLib/Parallax.glsllib

@ -16,14 +16,14 @@
vec3 eyeDir = normalize(vViewDir).xyz; vec3 eyeDir = normalize(vViewDir).xyz;
float nMinSamples = 6; float nMinSamples = 6.0;
float nMaxSamples = 1000 * parallaxScale; 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 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 fStepSize = 1.0 / nNumSamples;
float fCurrHeight = 0.0; float fCurrHeight = 0.0;
float fPrevHeight = 1.0; float fPrevHeight = 1.0;
float fNextHeight = 0.0; float fNextHeight = 0.0;
float nStepIndex = 0; float nStepIndex = 0.0;
vec2 vTexOffsetPerStep = fStepSize * vParallaxOffsetTS; vec2 vTexOffsetPerStep = fStepSize * vParallaxOffsetTS;
vec2 vTexCurrentOffset = texCoord; vec2 vTexCurrentOffset = texCoord;
float fCurrentBound = 1.0; float fCurrentBound = 1.0;

Loading…
Cancel
Save