Pārlūkot izejas kodu

Rename to non vs none

sebavan 6 gadi atpakaļ
vecāks
revīzija
acccd6124c

+ 6 - 6
src/Rendering/depthRenderer.ts

@@ -25,7 +25,7 @@ export class DepthRenderer {
     private _scene: Scene;
     private _depthMap: RenderTargetTexture;
     private _effect: Effect;
-    private readonly _storeNoneLinearDepth: boolean;
+    private readonly _storeNonLinearDepth: boolean;
     public readonly isPacked: boolean;
 
     private _cachedDefines: string;
@@ -48,11 +48,11 @@ export class DepthRenderer {
      * @param scene The scene the renderer belongs to
      * @param type The texture type of the depth map (default: Engine.TEXTURETYPE_FLOAT)
      * @param camera The camera to be used to render the depth map (default: scene's active camera)
-     * @param storeNoneLinearDepth Defines whether the depth is stored linearly like in Babylon Shadows or directly like glFragCoord.z
+     * @param storeNonLinearDepth Defines whether the depth is stored linearly like in Babylon Shadows or directly like glFragCoord.z
      */
-    constructor(scene: Scene, type: number = Constants.TEXTURETYPE_FLOAT, camera: Nullable<Camera> = null, storeNoneLinearDepth = false) {
+    constructor(scene: Scene, type: number = Constants.TEXTURETYPE_FLOAT, camera: Nullable<Camera> = null, storeNonLinearDepth = false) {
         this._scene = scene;
-        this._storeNoneLinearDepth = storeNoneLinearDepth;
+        this._storeNonLinearDepth = storeNonLinearDepth;
         this.isPacked = type === Constants.TEXTURETYPE_UNSIGNED_BYTE;
 
         DepthRenderer._SceneComponentInitialization(this._scene);
@@ -224,8 +224,8 @@ export class DepthRenderer {
         }
 
         // None linear depth
-        if (this._storeNoneLinearDepth) {
-            defines.push("#define NONELINEARDEPTH");
+        if (this._storeNonLinearDepth) {
+            defines.push("#define NONLINEARDEPTH");
         }
 
         // Float Mode

+ 4 - 4
src/Rendering/depthRendererSceneComponent.ts

@@ -15,10 +15,10 @@ declare module "../scene" {
         /**
          * Creates a depth renderer a given camera which contains a depth map which can be used for post processing.
          * @param camera The camera to create the depth renderer on (default: scene's active camera)
-         * @param storeNoneLinearDepth Defines whether the depth is stored linearly like in Babylon Shadows or directly like glFragCoord.z
+         * @param storeNonLinearDepth Defines whether the depth is stored linearly like in Babylon Shadows or directly like glFragCoord.z
          * @returns the created depth renderer
          */
-        enableDepthRenderer(camera?: Nullable<Camera>, storeNoneLinearDepth?: boolean): DepthRenderer;
+        enableDepthRenderer(camera?: Nullable<Camera>, storeNonLinearDepth?: boolean): DepthRenderer;
 
         /**
          * Disables a depth renderer for a given camera
@@ -28,7 +28,7 @@ declare module "../scene" {
     }
 }
 
-Scene.prototype.enableDepthRenderer = function(camera?: Nullable<Camera>, storeNoneLinearDepth = false): DepthRenderer {
+Scene.prototype.enableDepthRenderer = function(camera?: Nullable<Camera>, storeNonLinearDepth = false): DepthRenderer {
     camera = camera || this.activeCamera;
     if (!camera) {
         throw "No camera available to enable depth renderer";
@@ -46,7 +46,7 @@ Scene.prototype.enableDepthRenderer = function(camera?: Nullable<Camera>, storeN
         } else {
             textureType = Constants.TEXTURETYPE_UNSIGNED_BYTE;
         }
-        this._depthRenderer[camera.id] = new DepthRenderer(this, textureType, camera, storeNoneLinearDepth);
+        this._depthRenderer[camera.id] = new DepthRenderer(this, textureType, camera, storeNonLinearDepth);
     }
 
     return this._depthRenderer[camera.id];

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

@@ -16,7 +16,7 @@ void main(void)
 		discard;
 #endif
 
-#ifdef NONELINEARDEPTH
+#ifdef NONLINEARDEPTH
 	#ifdef PACKED
 		gl_FragColor = pack(gl_FragCoord.z);
 	#else