浏览代码

remove now unneeded color parameter, fix @ignore

Trevor Baron 7 年之前
父节点
当前提交
9419445156

+ 1 - 0
src/Materials/babylon.imageProcessingConfiguration.ts

@@ -2,6 +2,7 @@ module BABYLON {
     /**
      * Interface to follow in your material defines to integrate easily the
      * Image proccessing functions.
+     * @ignore
      */
     export interface IImageProcessingConfigurationDefines {
         IMAGEPROCESSING: boolean;

+ 0 - 1
src/PostProcess/babylon.imageProcessingPostProcess.ts

@@ -294,7 +294,6 @@
 
         /**
          * Defines cache preventing GC.
-         * @ignore
          */
         private _defines: IImageProcessingConfigurationDefines & { FROMLINEARSPACE: boolean } = {
             IMAGEPROCESSING: false,

+ 1 - 1
src/Shaders/ShadersInclude/helperFunctions.fx

@@ -70,7 +70,7 @@ float getRand(vec2 seed) {
 	return fract(sin(dot(seed.xy ,vec2(12.9898,78.233))) * 43758.5453);
 }
 
-float dither(vec2 seed, vec3 color, float varianceAmount) {
+float dither(vec2 seed, float varianceAmount) {
 	float rand = getRand(seed);
 	float dither = mix(-varianceAmount/255.0, varianceAmount/255.0, rand);
 	

+ 1 - 1
src/Shaders/ShadersInclude/imageProcessingFunctions.fx

@@ -83,7 +83,7 @@ vec4 applyImageProcessing(vec4 result) {
 
 #ifdef GRAIN
 	vec2 seed = vUV*(grainAnimatedSeed);
-	float grain = dither(seed, result.rgb, grainVarianceAmount);
+	float grain = dither(seed, grainVarianceAmount);
 
 	// Add less grain when luminance is high or low
 	float lum = getLuminance(result.rgb);

+ 1 - 1
src/Shaders/background.fragment.fx

@@ -289,7 +289,7 @@ vec4 color = vec4(finalColor, finalAlpha);
 
 #ifndef GRAIN // Do not apply noise multiple times
     #ifdef NOISE
-        color.rgb += dither(vPositionW.xy, color.rgb, 0.5);
+        color.rgb += dither(vPositionW.xy, 0.5);
         color = max(color, 0.0);
     #endif
 #endif