فهرست منبع

Merge pull request #8921 from Popov72/fix-csm-error-webgl1

Fix error not display when creating a CSM in WebGL1
Raanan Weber 5 سال پیش
والد
کامیت
b7216d273b
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      src/Lights/Shadows/cascadedShadowGenerator.ts

+ 2 - 2
src/Lights/Shadows/cascadedShadowGenerator.ts

@@ -715,13 +715,13 @@ export class CascadedShadowGenerator extends ShadowGenerator {
      * @param usefulFloatFirst By default the generator will try to use half float textures but if you need precision (for self shadowing for instance), you can use this option to enforce full float texture.
      */
     constructor(mapSize: number, light: DirectionalLight, usefulFloatFirst?: boolean) {
-        super(mapSize, light, usefulFloatFirst);
-
         if (!CascadedShadowGenerator.IsSupported) {
             Logger.Error("CascadedShadowMap needs WebGL 2 support.");
             return;
         }
 
+        super(mapSize, light, usefulFloatFirst);
+
         this.usePercentageCloserFiltering = true;
     }