Browse Source

Remove Intensity

sebavan 5 years ago
parent
commit
f75e7f2f62

+ 1 - 9
src/Materials/PBR/pbrSubSurfaceConfiguration.ts

@@ -116,14 +116,6 @@ export class PBRSubSurfaceConfiguration {
     public translucencyIntensity: number = 1;
 
     /**
-     * Defines the scattering intensity of the material.
-     * When scattering has been enabled, this defines how much of the "scattered light"
-     * is addded to the diffuse part of the material.
-     */
-    @serialize()
-    public scatteringIntensity: number = 1;
-
-    /**
      * When enabled, transparent surfaces will be tinted with the albedo colour (independent of thickness)
      */
     @serialize()
@@ -412,7 +404,7 @@ export class PBRSubSurfaceConfiguration {
                 this.tintColor.b,
                 this.tintColorAtDistance);
 
-            uniformBuffer.updateFloat3("vSubSurfaceIntensity", this.refractionIntensity, this.translucencyIntensity, this.scatteringIntensity);
+            uniformBuffer.updateFloat3("vSubSurfaceIntensity", this.refractionIntensity, this.translucencyIntensity, 0);
         }
 
         // Textures

+ 0 - 6
src/Shaders/ShadersInclude/pbrBlockSubSurface.fx

@@ -112,9 +112,6 @@ struct subSurfaceOutParams
     #ifdef SS_TRANSLUCENCY
         float translucencyIntensity = vSubSurfaceIntensity.y;
     #endif
-    #ifdef SS_SCATTERING
-        float scatteringIntensity = vSubSurfaceIntensity.z;
-    #endif
 
     #ifdef SS_THICKNESSANDMASK_TEXTURE
         float thickness = thicknessMap.r * vThicknessParam.y + vThicknessParam.x;
@@ -130,9 +127,6 @@ struct subSurfaceOutParams
             #ifdef SS_TRANSLUCENCY
                 translucencyIntensity *= thicknessMap.b;
             #endif
-            #ifdef SS_SCATTERING
-                scatteringIntensity *= thicknessMap.a;
-            #endif
         #endif
     #else
         float thickness = vThicknessParam.y;