浏览代码

Bump the depth constant bias in all shadowed directional light samples to work better on mobile platforms. Disable Urho3D logo in samples when using touch controls.

Lasse Öörni 12 年之前
父节点
当前提交
9486d17667
共有 31 个文件被更改,包括 41 次插入35 次删除
  1. 1 1
      Bin/Data/LuaScripts/06_SkeletalAnimation.lua
  2. 1 1
      Bin/Data/LuaScripts/08_Decals.lua
  3. 1 1
      Bin/Data/LuaScripts/09_MultipleViewports.lua
  4. 1 1
      Bin/Data/LuaScripts/11_Physics.lua
  5. 1 1
      Bin/Data/LuaScripts/12_PhysicsStressTest.lua
  6. 1 1
      Bin/Data/LuaScripts/13_Ragdolls.lua
  7. 1 1
      Bin/Data/LuaScripts/15_Navigation.lua
  8. 5 2
      Bin/Data/LuaScripts/18_CharacterDemo.lua
  9. 1 1
      Bin/Data/LuaScripts/19_VehicleDemo.lua
  10. 1 1
      Bin/Data/LuaScripts/23_Water.lua
  11. 1 1
      Bin/Data/LuaScripts/TestScene.lua
  12. 3 3
      Bin/Data/Scripts/06_SkeletalAnimation.as
  13. 1 1
      Bin/Data/Scripts/08_Decals.as
  14. 1 1
      Bin/Data/Scripts/09_MultipleViewports.as
  15. 1 1
      Bin/Data/Scripts/11_Physics.as
  16. 1 1
      Bin/Data/Scripts/12_PhysicsStressTest.as
  17. 2 2
      Bin/Data/Scripts/13_Ragdolls.as
  18. 1 1
      Bin/Data/Scripts/15_Navigation.as
  19. 4 1
      Bin/Data/Scripts/18_CharacterDemo.as
  20. 1 1
      Bin/Data/Scripts/19_VehicleDemo.as
  21. 1 1
      Bin/Data/Scripts/23_Water.as
  22. 1 1
      Source/Samples/06_SkeletalAnimation/SkeletalAnimation.cpp
  23. 1 1
      Source/Samples/08_Decals/Decals.cpp
  24. 1 1
      Source/Samples/09_MultipleViewports/MultipleViewports.cpp
  25. 1 1
      Source/Samples/11_Physics/Physics.cpp
  26. 1 1
      Source/Samples/12_PhysicsStressTest/PhysicsStressTest.cpp
  27. 1 1
      Source/Samples/13_Ragdolls/Ragdolls.cpp
  28. 1 1
      Source/Samples/15_Navigation/Navigation.cpp
  29. 1 1
      Source/Samples/18_CharacterDemo/CharacterDemo.cpp
  30. 1 1
      Source/Samples/19_VehicleDemo/VehicleDemo.cpp
  31. 1 1
      Source/Samples/23_Water/Water.cpp

+ 1 - 1
Bin/Data/LuaScripts/06_SkeletalAnimation.lua

@@ -68,7 +68,7 @@ function CreateScene()
     local light = lightNode:CreateComponent("Light")
     local light = lightNode:CreateComponent("Light")
     light.lightType = LIGHT_DIRECTIONAL
     light.lightType = LIGHT_DIRECTIONAL
     light.castShadows = true
     light.castShadows = true
-    light.shadowBias = BiasParameters(0.0001, 0.5)
+    light.shadowBias = BiasParameters(0.00025, 0.5)
     -- Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     -- Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
     light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
     
     

+ 1 - 1
Bin/Data/LuaScripts/08_Decals.lua

@@ -68,7 +68,7 @@ function CreateScene()
     local light = lightNode:CreateComponent("Light")
     local light = lightNode:CreateComponent("Light")
     light.lightType = LIGHT_DIRECTIONAL
     light.lightType = LIGHT_DIRECTIONAL
     light.castShadows = true
     light.castShadows = true
-    light.shadowBias = BiasParameters(0.0001, 0.5)
+    light.shadowBias = BiasParameters(0.00025, 0.5)
     -- Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     -- Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
     light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
 
 

+ 1 - 1
Bin/Data/LuaScripts/09_MultipleViewports.lua

@@ -67,7 +67,7 @@ function CreateScene()
     local light = lightNode:CreateComponent("Light")
     local light = lightNode:CreateComponent("Light")
     light.lightType = LIGHT_DIRECTIONAL
     light.lightType = LIGHT_DIRECTIONAL
     light.castShadows = true
     light.castShadows = true
-    light.shadowBias = BiasParameters(0.0001, 0.5)
+    light.shadowBias = BiasParameters(0.00025, 0.5)
     -- Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     -- Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
     light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
 
 

+ 1 - 1
Bin/Data/LuaScripts/11_Physics.lua

@@ -64,7 +64,7 @@ function CreateScene()
     local light = lightNode:CreateComponent("Light")
     local light = lightNode:CreateComponent("Light")
     light.lightType = LIGHT_DIRECTIONAL
     light.lightType = LIGHT_DIRECTIONAL
     light.castShadows = true
     light.castShadows = true
-    light.shadowBias = BiasParameters(0.0001, 0.5)
+    light.shadowBias = BiasParameters(0.00025, 0.5)
     -- Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     -- Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
     light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
     
     

+ 1 - 1
Bin/Data/LuaScripts/12_PhysicsStressTest.lua

@@ -63,7 +63,7 @@ function CreateScene()
     local light = lightNode:CreateComponent("Light")
     local light = lightNode:CreateComponent("Light")
     light.lightType = LIGHT_DIRECTIONAL
     light.lightType = LIGHT_DIRECTIONAL
     light.castShadows = true
     light.castShadows = true
-    light.shadowBias = BiasParameters(0.0001, 0.5)
+    light.shadowBias = BiasParameters(0.00025, 0.5)
     -- Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     -- Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
     light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
 
 

+ 1 - 1
Bin/Data/LuaScripts/13_Ragdolls.lua

@@ -63,7 +63,7 @@ function CreateScene()
     local light = lightNode:CreateComponent("Light")
     local light = lightNode:CreateComponent("Light")
     light.lightType = LIGHT_DIRECTIONAL
     light.lightType = LIGHT_DIRECTIONAL
     light.castShadows = true
     light.castShadows = true
-    light.shadowBias = BiasParameters(0.0001, 0.5)
+    light.shadowBias = BiasParameters(0.00025, 0.5)
     -- Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     -- Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
     light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
 
 

+ 1 - 1
Bin/Data/LuaScripts/15_Navigation.lua

@@ -72,7 +72,7 @@ function CreateScene()
     local light = lightNode:CreateComponent("Light")
     local light = lightNode:CreateComponent("Light")
     light.lightType = LIGHT_DIRECTIONAL
     light.lightType = LIGHT_DIRECTIONAL
     light.castShadows = true
     light.castShadows = true
-    light.shadowBias = BiasParameters(0.0001, 0.5)
+    light.shadowBias = BiasParameters(0.00025, 0.5)
     -- Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     -- Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
     light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
 
 

+ 5 - 2
Bin/Data/LuaScripts/18_CharacterDemo.lua

@@ -55,7 +55,10 @@ function Start()
     CreateInstructions()
     CreateInstructions()
 
 
     -- Activate mobile stuff only when appropriate
     -- Activate mobile stuff only when appropriate
-    if GetPlatform() == "Android" or GetPlatform() == "iOS" then require "LuaScripts/Utilities/Touch" end
+    if GetPlatform() == "Android" or GetPlatform() == "iOS" then 
+        SetLogoVisible(false)
+        require "LuaScripts/Utilities/Touch"
+    end
 
 
     -- Subscribe to necessary events
     -- Subscribe to necessary events
     SubscribeToEvents()
     SubscribeToEvents()
@@ -90,7 +93,7 @@ function CreateScene()
     local light = lightNode:CreateComponent("Light")
     local light = lightNode:CreateComponent("Light")
     light.lightType = LIGHT_DIRECTIONAL
     light.lightType = LIGHT_DIRECTIONAL
     light.castShadows = true
     light.castShadows = true
-    light.shadowBias = BiasParameters(0.0001, 0.5)
+    light.shadowBias = BiasParameters(0.00025, 0.5)
     -- Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     -- Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
     light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
 
 

+ 1 - 1
Bin/Data/LuaScripts/19_VehicleDemo.lua

@@ -75,7 +75,7 @@ function CreateScene()
     local light = lightNode:CreateComponent("Light")
     local light = lightNode:CreateComponent("Light")
     light.lightType = LIGHT_DIRECTIONAL
     light.lightType = LIGHT_DIRECTIONAL
     light.castShadows = true
     light.castShadows = true
-    light.shadowBias = BiasParameters(0.0001, 0.5)
+    light.shadowBias = BiasParameters(0.00025, 0.5)
     light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
     light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
     light.specularIntensity = 0.5
     light.specularIntensity = 0.5
 
 

+ 1 - 1
Bin/Data/LuaScripts/23_Water.lua

@@ -61,7 +61,7 @@ function CreateScene()
     local light = lightNode:CreateComponent("Light")
     local light = lightNode:CreateComponent("Light")
     light.lightType = LIGHT_DIRECTIONAL
     light.lightType = LIGHT_DIRECTIONAL
     light.castShadows = true
     light.castShadows = true
-    light.shadowBias = BiasParameters(0.0001, 0.5)
+    light.shadowBias = BiasParameters(0.00025, 0.5)
     light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
     light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
     light.specularIntensity = 0.5;
     light.specularIntensity = 0.5;
     -- Apply slightly overbright lighting to match the skybox
     -- Apply slightly overbright lighting to match the skybox

+ 1 - 1
Bin/Data/LuaScripts/TestScene.lua

@@ -132,7 +132,7 @@ function InitScene()
         local light = lightNode:CreateComponent("Light")
         local light = lightNode:CreateComponent("Light")
         light.lightType = LIGHT_DIRECTIONAL
         light.lightType = LIGHT_DIRECTIONAL
         light.castShadows = true
         light.castShadows = true
-        light.shadowBias = BiasParameters(0.0001, 0.5)
+        light.shadowBias = BiasParameters(0.00025, 0.5)
         light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
         light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
         light.specularIntensity = 0.5
         light.specularIntensity = 0.5
     end
     end

+ 3 - 3
Bin/Data/Scripts/06_SkeletalAnimation.as

@@ -63,7 +63,7 @@ void CreateScene()
     Light@ light = lightNode.CreateComponent("Light");
     Light@ light = lightNode.CreateComponent("Light");
     light.lightType = LIGHT_DIRECTIONAL;
     light.lightType = LIGHT_DIRECTIONAL;
     light.castShadows = true;
     light.castShadows = true;
-    light.shadowBias = BiasParameters(0.0001f, 0.5f);
+    light.shadowBias = BiasParameters(0.00025f, 0.5f);
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light.shadowCascade = CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f);
     light.shadowCascade = CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f);
     
     
@@ -72,7 +72,7 @@ void CreateScene()
     const float MODEL_MOVE_SPEED = 2.0f;
     const float MODEL_MOVE_SPEED = 2.0f;
     const float MODEL_ROTATE_SPEED = 100.0f;
     const float MODEL_ROTATE_SPEED = 100.0f;
     const BoundingBox bounds(Vector3(-47.0f, 0.0f, -47.0f), Vector3(47.0f, 0.0f, 47.0f));
     const BoundingBox bounds(Vector3(-47.0f, 0.0f, -47.0f), Vector3(47.0f, 0.0f, 47.0f));
-    
+
     for (uint i = 0; i < NUM_MODELS; ++i)
     for (uint i = 0; i < NUM_MODELS; ++i)
     {
     {
         Node@ modelNode = scene_.CreateChild("Jack");
         Node@ modelNode = scene_.CreateChild("Jack");
@@ -82,7 +82,7 @@ void CreateScene()
         modelObject.model = cache.GetResource("Model", "Models/Jack.mdl");
         modelObject.model = cache.GetResource("Model", "Models/Jack.mdl");
         modelObject.material = cache.GetResource("Material", "Materials/Jack.xml");
         modelObject.material = cache.GetResource("Material", "Materials/Jack.xml");
         modelObject.castShadows = true;
         modelObject.castShadows = true;
-        
+
         // Create an AnimationState for a walk animation. Its time position will need to be manually updated to advance the
         // Create an AnimationState for a walk animation. Its time position will need to be manually updated to advance the
         // animation, The alternative would be to use an AnimationController component which updates the animation automatically,
         // animation, The alternative would be to use an AnimationController component which updates the animation automatically,
         // but we need to update the model's position manually in any case
         // but we need to update the model's position manually in any case

+ 1 - 1
Bin/Data/Scripts/08_Decals.as

@@ -62,7 +62,7 @@ void CreateScene()
     Light@ light = lightNode.CreateComponent("Light");
     Light@ light = lightNode.CreateComponent("Light");
     light.lightType = LIGHT_DIRECTIONAL;
     light.lightType = LIGHT_DIRECTIONAL;
     light.castShadows = true;
     light.castShadows = true;
-    light.shadowBias = BiasParameters(0.0001f, 0.5f);
+    light.shadowBias = BiasParameters(0.00025f, 0.5f);
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light.shadowCascade = CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f);
     light.shadowCascade = CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f);
 
 

+ 1 - 1
Bin/Data/Scripts/09_MultipleViewports.as

@@ -61,7 +61,7 @@ void CreateScene()
     Light@ light = lightNode.CreateComponent("Light");
     Light@ light = lightNode.CreateComponent("Light");
     light.lightType = LIGHT_DIRECTIONAL;
     light.lightType = LIGHT_DIRECTIONAL;
     light.castShadows = true;
     light.castShadows = true;
-    light.shadowBias = BiasParameters(0.0001f, 0.5f);
+    light.shadowBias = BiasParameters(0.00025f, 0.5f);
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light.shadowCascade = CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f);
     light.shadowCascade = CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f);
 
 

+ 1 - 1
Bin/Data/Scripts/11_Physics.as

@@ -58,7 +58,7 @@ void CreateScene()
     Light@ light = lightNode.CreateComponent("Light");
     Light@ light = lightNode.CreateComponent("Light");
     light.lightType = LIGHT_DIRECTIONAL;
     light.lightType = LIGHT_DIRECTIONAL;
     light.castShadows = true;
     light.castShadows = true;
-    light.shadowBias = BiasParameters(0.0001f, 0.5f);
+    light.shadowBias = BiasParameters(0.00025f, 0.5f);
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light.shadowCascade = CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f);
     light.shadowCascade = CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f);
     
     

+ 1 - 1
Bin/Data/Scripts/12_PhysicsStressTest.as

@@ -57,7 +57,7 @@ void CreateScene()
     Light@ light = lightNode.CreateComponent("Light");
     Light@ light = lightNode.CreateComponent("Light");
     light.lightType = LIGHT_DIRECTIONAL;
     light.lightType = LIGHT_DIRECTIONAL;
     light.castShadows = true;
     light.castShadows = true;
-    light.shadowBias = BiasParameters(0.0001f, 0.5f);
+    light.shadowBias = BiasParameters(0.00025f, 0.5f);
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light.shadowCascade = CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f);
     light.shadowCascade = CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f);
 
 

+ 2 - 2
Bin/Data/Scripts/13_Ragdolls.as

@@ -57,7 +57,7 @@ void CreateScene()
     Light@ light = lightNode.CreateComponent("Light");
     Light@ light = lightNode.CreateComponent("Light");
     light.lightType = LIGHT_DIRECTIONAL;
     light.lightType = LIGHT_DIRECTIONAL;
     light.castShadows = true;
     light.castShadows = true;
-    light.shadowBias = BiasParameters(0.0001f, 0.5f);
+    light.shadowBias = BiasParameters(0.00025f, 0.5f);
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light.shadowCascade = CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f);
     light.shadowCascade = CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f);
     
     
@@ -112,7 +112,7 @@ void CreateScene()
             modelNode.CreateScriptObject(scriptFile, "CreateRagdoll");
             modelNode.CreateScriptObject(scriptFile, "CreateRagdoll");
         }
         }
     }
     }
-    
+
     // Create the camera. Limit far clip distance to match the fog. Note: now we actually create the camera node outside
     // Create the camera. Limit far clip distance to match the fog. Note: now we actually create the camera node outside
     // the scene, because we want it to be unaffected by scene load / save
     // the scene, because we want it to be unaffected by scene load / save
     cameraNode = Node();
     cameraNode = Node();

+ 1 - 1
Bin/Data/Scripts/15_Navigation.as

@@ -67,7 +67,7 @@ void CreateScene()
     Light@ light = lightNode.CreateComponent("Light");
     Light@ light = lightNode.CreateComponent("Light");
     light.lightType = LIGHT_DIRECTIONAL;
     light.lightType = LIGHT_DIRECTIONAL;
     light.castShadows = true;
     light.castShadows = true;
-    light.shadowBias = BiasParameters(0.0001f, 0.5f);
+    light.shadowBias = BiasParameters(0.00025f, 0.5f);
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light.shadowCascade = CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f);
     light.shadowCascade = CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f);
 
 

+ 4 - 1
Bin/Data/Scripts/18_CharacterDemo.as

@@ -47,7 +47,10 @@ void Start()
 
 
     // Activate mobile stuff when appropriate
     // Activate mobile stuff when appropriate
     if (GetPlatform() == "Android" || GetPlatform() == "iOS")
     if (GetPlatform() == "Android" || GetPlatform() == "iOS")
+    {
+        SetLogoVisible(false);
         InitTouchInput();
         InitTouchInput();
+    }
 
 
     // Subscribe to necessary events
     // Subscribe to necessary events
     SubscribeToEvents();
     SubscribeToEvents();
@@ -82,7 +85,7 @@ void CreateScene()
     Light@ light = lightNode.CreateComponent("Light");
     Light@ light = lightNode.CreateComponent("Light");
     light.lightType = LIGHT_DIRECTIONAL;
     light.lightType = LIGHT_DIRECTIONAL;
     light.castShadows = true;
     light.castShadows = true;
-    light.shadowBias = BiasParameters(0.0001f, 0.5f);
+    light.shadowBias = BiasParameters(0.00025f, 0.5f);
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light.shadowCascade = CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f);
     light.shadowCascade = CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f);
 
 

+ 1 - 1
Bin/Data/Scripts/19_VehicleDemo.as

@@ -68,7 +68,7 @@ void CreateScene()
     Light@ light = lightNode.CreateComponent("Light");
     Light@ light = lightNode.CreateComponent("Light");
     light.lightType = LIGHT_DIRECTIONAL;
     light.lightType = LIGHT_DIRECTIONAL;
     light.castShadows = true;
     light.castShadows = true;
-    light.shadowBias = BiasParameters(0.0001f, 0.5f);
+    light.shadowBias = BiasParameters(0.00025f, 0.5f);
     light.shadowCascade = CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f);
     light.shadowCascade = CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f);
     light.specularIntensity = 0.5f;
     light.specularIntensity = 0.5f;
 
 

+ 1 - 1
Bin/Data/Scripts/23_Water.as

@@ -55,7 +55,7 @@ void CreateScene()
     Light@ light = lightNode.CreateComponent("Light");
     Light@ light = lightNode.CreateComponent("Light");
     light.lightType = LIGHT_DIRECTIONAL;
     light.lightType = LIGHT_DIRECTIONAL;
     light.castShadows = true;
     light.castShadows = true;
-    light.shadowBias = BiasParameters(0.0001f, 0.5f);
+    light.shadowBias = BiasParameters(0.00025f, 0.5f);
     light.shadowCascade = CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f);
     light.shadowCascade = CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f);
     light.specularIntensity = 0.5f;
     light.specularIntensity = 0.5f;
     // Apply slightly overbright lighting to match the skybox
     // Apply slightly overbright lighting to match the skybox

+ 1 - 1
Source/Samples/06_SkeletalAnimation/SkeletalAnimation.cpp

@@ -109,7 +109,7 @@ void SkeletalAnimation::CreateScene()
     Light* light = lightNode->CreateComponent<Light>();
     Light* light = lightNode->CreateComponent<Light>();
     light->SetLightType(LIGHT_DIRECTIONAL);
     light->SetLightType(LIGHT_DIRECTIONAL);
     light->SetCastShadows(true);
     light->SetCastShadows(true);
-    light->SetShadowBias(BiasParameters(0.0001f, 0.5f));
+    light->SetShadowBias(BiasParameters(0.00025f, 0.5f));
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light->SetShadowCascade(CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f));
     light->SetShadowCascade(CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f));
     
     

+ 1 - 1
Source/Samples/08_Decals/Decals.cpp

@@ -107,7 +107,7 @@ void Decals::CreateScene()
     Light* light = lightNode->CreateComponent<Light>();
     Light* light = lightNode->CreateComponent<Light>();
     light->SetLightType(LIGHT_DIRECTIONAL);
     light->SetLightType(LIGHT_DIRECTIONAL);
     light->SetCastShadows(true);
     light->SetCastShadows(true);
-    light->SetShadowBias(BiasParameters(0.0001f, 0.5f));
+    light->SetShadowBias(BiasParameters(0.00025f, 0.5f));
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light->SetShadowCascade(CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f));
     light->SetShadowCascade(CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f));
 
 

+ 1 - 1
Source/Samples/09_MultipleViewports/MultipleViewports.cpp

@@ -107,7 +107,7 @@ void MultipleViewports::CreateScene()
     Light* light = lightNode->CreateComponent<Light>();
     Light* light = lightNode->CreateComponent<Light>();
     light->SetLightType(LIGHT_DIRECTIONAL);
     light->SetLightType(LIGHT_DIRECTIONAL);
     light->SetCastShadows(true);
     light->SetCastShadows(true);
-    light->SetShadowBias(BiasParameters(0.0001f, 0.5f));
+    light->SetShadowBias(BiasParameters(0.00025f, 0.5f));
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light->SetShadowCascade(CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f));
     light->SetShadowCascade(CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f));
 
 

+ 1 - 1
Source/Samples/11_Physics/Physics.cpp

@@ -106,7 +106,7 @@ void Physics::CreateScene()
     Light* light = lightNode->CreateComponent<Light>();
     Light* light = lightNode->CreateComponent<Light>();
     light->SetLightType(LIGHT_DIRECTIONAL);
     light->SetLightType(LIGHT_DIRECTIONAL);
     light->SetCastShadows(true);
     light->SetCastShadows(true);
-    light->SetShadowBias(BiasParameters(0.0001f, 0.5f));
+    light->SetShadowBias(BiasParameters(0.00025f, 0.5f));
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light->SetShadowCascade(CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f));
     light->SetShadowCascade(CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f));
     
     

+ 1 - 1
Source/Samples/12_PhysicsStressTest/PhysicsStressTest.cpp

@@ -105,7 +105,7 @@ void PhysicsStressTest::CreateScene()
     Light* light = lightNode->CreateComponent<Light>();
     Light* light = lightNode->CreateComponent<Light>();
     light->SetLightType(LIGHT_DIRECTIONAL);
     light->SetLightType(LIGHT_DIRECTIONAL);
     light->SetCastShadows(true);
     light->SetCastShadows(true);
-    light->SetShadowBias(BiasParameters(0.0001f, 0.5f));
+    light->SetShadowBias(BiasParameters(0.00025f, 0.5f));
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light->SetShadowCascade(CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f));
     light->SetShadowCascade(CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f));
     
     

+ 1 - 1
Source/Samples/13_Ragdolls/Ragdolls.cpp

@@ -108,7 +108,7 @@ void Ragdolls::CreateScene()
     Light* light = lightNode->CreateComponent<Light>();
     Light* light = lightNode->CreateComponent<Light>();
     light->SetLightType(LIGHT_DIRECTIONAL);
     light->SetLightType(LIGHT_DIRECTIONAL);
     light->SetCastShadows(true);
     light->SetCastShadows(true);
-    light->SetShadowBias(BiasParameters(0.0001f, 0.5f));
+    light->SetShadowBias(BiasParameters(0.00025f, 0.5f));
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light->SetShadowCascade(CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f));
     light->SetShadowCascade(CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f));
     
     

+ 1 - 1
Source/Samples/15_Navigation/Navigation.cpp

@@ -108,7 +108,7 @@ void Navigation::CreateScene()
     Light* light = lightNode->CreateComponent<Light>();
     Light* light = lightNode->CreateComponent<Light>();
     light->SetLightType(LIGHT_DIRECTIONAL);
     light->SetLightType(LIGHT_DIRECTIONAL);
     light->SetCastShadows(true);
     light->SetCastShadows(true);
-    light->SetShadowBias(BiasParameters(0.0001f, 0.5f));
+    light->SetShadowBias(BiasParameters(0.00025f, 0.5f));
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
     light->SetShadowCascade(CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f));
     light->SetShadowCascade(CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f));
     
     

+ 1 - 1
Source/Samples/18_CharacterDemo/CharacterDemo.cpp

@@ -113,7 +113,7 @@ void CharacterDemo::CreateScene()
     Light* light = lightNode->CreateComponent<Light>();
     Light* light = lightNode->CreateComponent<Light>();
     light->SetLightType(LIGHT_DIRECTIONAL);
     light->SetLightType(LIGHT_DIRECTIONAL);
     light->SetCastShadows(true);
     light->SetCastShadows(true);
-    light->SetShadowBias(BiasParameters(0.0001f, 0.5f));
+    light->SetShadowBias(BiasParameters(0.00025f, 0.5f));
     light->SetShadowCascade(CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f));
     light->SetShadowCascade(CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f));
     light->SetSpecularIntensity(0.5f);
     light->SetSpecularIntensity(0.5f);
 
 

+ 1 - 1
Source/Samples/19_VehicleDemo/VehicleDemo.cpp

@@ -110,7 +110,7 @@ void VehicleDemo::CreateScene()
     Light* light = lightNode->CreateComponent<Light>();
     Light* light = lightNode->CreateComponent<Light>();
     light->SetLightType(LIGHT_DIRECTIONAL);
     light->SetLightType(LIGHT_DIRECTIONAL);
     light->SetCastShadows(true);
     light->SetCastShadows(true);
-    light->SetShadowBias(BiasParameters(0.0001f, 0.5f));
+    light->SetShadowBias(BiasParameters(0.00025f, 0.5f));
     light->SetShadowCascade(CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f));
     light->SetShadowCascade(CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f));
     light->SetSpecularIntensity(0.5f);
     light->SetSpecularIntensity(0.5f);
     
     

+ 1 - 1
Source/Samples/23_Water/Water.cpp

@@ -99,7 +99,7 @@ void Water::CreateScene()
     Light* light = lightNode->CreateComponent<Light>();
     Light* light = lightNode->CreateComponent<Light>();
     light->SetLightType(LIGHT_DIRECTIONAL);
     light->SetLightType(LIGHT_DIRECTIONAL);
     light->SetCastShadows(true);
     light->SetCastShadows(true);
-    light->SetShadowBias(BiasParameters(0.0001f, 0.5f));
+    light->SetShadowBias(BiasParameters(0.00025f, 0.5f));
     light->SetShadowCascade(CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f));
     light->SetShadowCascade(CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f));
     light->SetSpecularIntensity(0.5f);
     light->SetSpecularIntensity(0.5f);
     // Apply slightly overbright lighting to match the skybox
     // Apply slightly overbright lighting to match the skybox