瀏覽代碼

fix bug in sun exposure sampling

Riccardo Balbo 3 天之前
父節點
當前提交
ca61194b12

+ 1 - 1
jme3-core/src/main/resources/Common/ShaderLib/module/pbrlighting/PBRLightingUtils.glsllib

@@ -144,7 +144,7 @@
             
             surface.exposure = 1.0; //default value
             #ifdef EXPOSUREMAP
-                surface.exposure *= texture2D(m_SunLightExposureMap, newTexCoord;
+                surface.exposure *= texture2D(m_SunLightExposureMap, newTexCoord).r;
             #endif
             #ifdef STATIC_SUN_EXPOSURE
                 surface.exposure *= m_StaticSunIntensity; //single float value to indicate percentage of sunlight hitting the model (only suitable for small models or models with equal sunlight exposure accross the entire model