Popov72 %!s(int64=4) %!d(string=hai) anos
pai
achega
42418e4969
Modificáronse 2 ficheiros con 6 adicións e 3 borrados
  1. 5 0
      src/Engines/constants.ts
  2. 1 3
      src/Lights/Shadows/shadowGenerator.ts

+ 5 - 0
src/Engines/constants.ts

@@ -546,4 +546,9 @@ export class Constants {
      * using the getIndex(Constants.PREPASS_ALBEDO_TEXTURE_TYPE)
      */
     public static readonly PREPASS_ALBEDO_TEXTURE_TYPE = 6;
+
+    /**
+     * Prefixes used by the engine for custom effects
+     */
+    public static readonly CUSTOMEFFECT_PREFIX_SHADOWGENERATOR = "bjs_shadowgenerator_";
 }

+ 1 - 3
src/Lights/Shadows/shadowGenerator.ts

@@ -229,7 +229,7 @@ export class ShadowGenerator implements IShadowGenerator {
 
     public set id(id: string) {
         this._id = id;
-        this._nameForCustomEffect = "shadowgenerator_" + id;
+        this._nameForCustomEffect = Constants.CUSTOMEFFECT_PREFIX_SHADOWGENERATOR + id;
     }
 
     /** Gets or sets the custom shader name to use */
@@ -791,8 +791,6 @@ export class ShadowGenerator implements IShadowGenerator {
     protected _scene: Scene;
     protected _lightDirection = Vector3.Zero();
 
-    protected _effect: Effect;
-
     protected _viewMatrix = Matrix.Zero();
     protected _projectionMatrix = Matrix.Zero();
     protected _transformMatrix = Matrix.Zero();