Browse Source

missing comments

Trevor Baron 7 năm trước cách đây
mục cha
commit
fca83fff18

+ 4 - 1
src/PostProcess/babylon.circleOfConfusionPostProcess.ts

@@ -24,7 +24,7 @@ module BABYLON {
         /**
          * Creates a new instance of @see CircleOfConfusionPostProcess
          * @param name The name of the effect.
-         * @param depthTexture The depth texture of the scene to compute the circle of confusion.
+         * @param depthTexture The depth texture of the scene to compute the circle of confusion. This must be set in order for this to function but may be set after initialization if needed.
          * @param options The required width/height ratio to downsize to before computing the render pass.
          * @param camera The camera to apply the render pass to.
          * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
@@ -52,6 +52,9 @@ module BABYLON {
             })
         }
 
+        /**
+         * Depth texture to be used to compute the circle of confusion. This must be set here or in the constructor in order for the post process to function.
+         */
         public set depthTexture(value: RenderTargetTexture){
             this._depthTexture = value;
         }

+ 7 - 1
src/PostProcess/babylon.depthOfFieldEffect.ts

@@ -24,6 +24,9 @@ module BABYLON {
         private _circleOfConfusion: CircleOfConfusionPostProcess;
         private _depthOfFieldBlurX: Array<DepthOfFieldBlurPostProcess>;
         private _depthOfFieldBlurY: Array<DepthOfFieldBlurPostProcess>;
+        /**
+         * Private, last post process of dof
+         */
         public _depthOfFieldMerge: DepthOfFieldMergePostProcess;
 
         private _effects: Array<PostProcess> = [];
@@ -68,7 +71,7 @@ module BABYLON {
         /**
          * Creates a new instance of @see DepthOfFieldEffect
          * @param scene The scene the effect belongs to.
-         * @param depthTexture The depth texture of the scene to compute the circle of confusion.
+         * @param depthTexture The depth texture of the scene to compute the circle of confusion.This must be set in order for this to function but may be set after initialization if needed.
          * @param pipelineTextureType The type of texture to be used when performing the post processing.
          */
         constructor(scene: Scene, depthTexture: Nullable<RenderTargetTexture>, blurLevel: DepthOfFieldEffectBlurLevel = DepthOfFieldEffectBlurLevel.Low, pipelineTextureType = 0) {
@@ -128,6 +131,9 @@ module BABYLON {
             this._effects.push(this._depthOfFieldMerge);
         }
 
+        /**
+         * Depth texture to be used to compute the circle of confusion. This must be set here or in the constructor in order for the post process to function.
+         */
         public set depthTexture(value: RenderTargetTexture){
             this._circleOfConfusion.depthTexture = value;
         }

+ 5 - 3
src/PostProcess/babylon.postProcess.ts

@@ -296,14 +296,16 @@
             return this;
         }
 
-        public useOwnOutput(): PostProcess {
+        /**
+         * Reverses the effect of calling shareOutputWith and returns the post process back to its original state. 
+         * This should be called if the post process that shares output with this post process is disabled/disposed.
+         */
+        public useOwnOutput() {
             if(this._textures.length == 0){
                 this._textures = new SmartArray<InternalTexture>(2);
             }
 
             this._shareOutputWithPostProcess = null;
-
-            return this;
         }
 
         /**