Browse Source

Merge remote-tracking branch 'dragonCASTjosh/master'

Lasse Öörni 8 years ago
parent
commit
e5dcfdafbb
35 changed files with 1152 additions and 312 deletions
  1. 2 0
      Source/Samples/42_PBRMaterials/PBRMaterials.cpp
  2. 1 0
      bin/Autoload/LargeData/Materials/PBR/Check.xml
  3. 4 1
      bin/Autoload/LargeData/Materials/PBR/HighRoughMetallic0.xml
  4. 4 1
      bin/Autoload/LargeData/Materials/PBR/HighRoughMetallic10.xml
  5. 4 1
      bin/Autoload/LargeData/Materials/PBR/HighRoughMetallic3.xml
  6. 4 1
      bin/Autoload/LargeData/Materials/PBR/HighRoughMetallic5.xml
  7. 4 1
      bin/Autoload/LargeData/Materials/PBR/HighRoughMetallic7.xml
  8. 2 1
      bin/Autoload/LargeData/Materials/PBR/Metallic0.xml
  9. 2 1
      bin/Autoload/LargeData/Materials/PBR/Metallic10.xml
  10. 2 1
      bin/Autoload/LargeData/Materials/PBR/Metallic3.xml
  11. 2 1
      bin/Autoload/LargeData/Materials/PBR/Metallic5.xml
  12. 2 1
      bin/Autoload/LargeData/Materials/PBR/Metallic7.xml
  13. 4 1
      bin/Autoload/LargeData/Materials/PBR/MetallicRough0.xml
  14. 2 1
      bin/Autoload/LargeData/Materials/PBR/MetallicRough10.xml
  15. 4 1
      bin/Autoload/LargeData/Materials/PBR/MetallicRough3.xml
  16. 4 1
      bin/Autoload/LargeData/Materials/PBR/MetallicRough5.xml
  17. 2 1
      bin/Autoload/LargeData/Materials/PBR/MetallicRough7.xml
  18. 2 1
      bin/Autoload/LargeData/Materials/PBR/Mud.xml
  19. 2 1
      bin/Autoload/LargeData/Materials/PBR/Roughness0.xml
  20. 2 1
      bin/Autoload/LargeData/Materials/PBR/Roughness10.xml
  21. 2 1
      bin/Autoload/LargeData/Materials/PBR/Roughness3.xml
  22. 2 1
      bin/Autoload/LargeData/Materials/PBR/Roughness5.xml
  23. 2 1
      bin/Autoload/LargeData/Materials/PBR/Roughness7.xml
  24. 1 0
      bin/Autoload/LargeData/Materials/PBR/Tile.xml
  25. 36 7
      bin/CoreData/Shaders/GLSL/BRDF.glsl
  26. 1 1
      bin/CoreData/Shaders/GLSL/Constants.glsl
  27. 8 8
      bin/CoreData/Shaders/GLSL/IBL.glsl
  28. 73 37
      bin/CoreData/Shaders/GLSL/PBR.glsl
  29. 36 7
      bin/CoreData/Shaders/HLSL/BRDF.hlsl
  30. 1 1
      bin/CoreData/Shaders/HLSL/Constants.hlsl
  31. 8 8
      bin/CoreData/Shaders/HLSL/IBL.hlsl
  32. 66 32
      bin/CoreData/Shaders/HLSL/PBR.hlsl
  33. 2 0
      bin/Data/LuaScripts/42_PBRMaterials.lua
  34. 857 190
      bin/Data/Scenes/PBRExample.xml
  35. 2 0
      bin/Data/Scripts/42_PBRMaterials.as

+ 2 - 0
Source/Samples/42_PBRMaterials/PBRMaterials.cpp

@@ -220,6 +220,8 @@ void PBRMaterials::SetupViewport()
     SharedPtr<RenderPath> effectRenderPath = viewport->GetRenderPath()->Clone();
     SharedPtr<RenderPath> effectRenderPath = viewport->GetRenderPath()->Clone();
     effectRenderPath->Append(cache->GetResource<XMLFile>("PostProcess/FXAA2.xml"));
     effectRenderPath->Append(cache->GetResource<XMLFile>("PostProcess/FXAA2.xml"));
     effectRenderPath->Append(cache->GetResource<XMLFile>("PostProcess/GammaCorrection.xml"));
     effectRenderPath->Append(cache->GetResource<XMLFile>("PostProcess/GammaCorrection.xml"));
+	effectRenderPath->Append(cache->GetResource<XMLFile>("PostProcess/Tonemap.xml"));
+	effectRenderPath->Append(cache->GetResource<XMLFile>("PostProcess/AutoExposure.xml"));
 
 
     viewport->SetRenderPath(effectRenderPath);
     viewport->SetRenderPath(effectRenderPath);
 }
 }

+ 1 - 0
bin/Autoload/LargeData/Materials/PBR/Check.xml

@@ -17,6 +17,7 @@
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
 	<alphatocoverage enable="false" />
 	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
 	<occlusion enable="true" />
 	<occlusion enable="true" />
 </material>
 </material>

+ 4 - 1
bin/Autoload/LargeData/Materials/PBR/HighRoughMetallic0.xml

@@ -3,7 +3,7 @@
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
-	<parameter name="MatDiffColor" value="1 1 1 1" />
+	<parameter name="MatDiffColor" value="0.8 0.3 0.1 1" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
@@ -13,5 +13,8 @@
 	<shadowcull value="ccw" />
 	<shadowcull value="ccw" />
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
+	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
+	<occlusion enable="true" />
 </material>
 </material>

+ 4 - 1
bin/Autoload/LargeData/Materials/PBR/HighRoughMetallic10.xml

@@ -3,7 +3,7 @@
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
-	<parameter name="MatDiffColor" value="1 1 1 1" />
+	<parameter name="MatDiffColor" value="0.8 0.3 0.1 1" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
@@ -13,5 +13,8 @@
 	<shadowcull value="ccw" />
 	<shadowcull value="ccw" />
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
+	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
+	<occlusion enable="true" />
 </material>
 </material>

+ 4 - 1
bin/Autoload/LargeData/Materials/PBR/HighRoughMetallic3.xml

@@ -3,7 +3,7 @@
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
-	<parameter name="MatDiffColor" value="1 1 1 1" />
+	<parameter name="MatDiffColor" value="0.8 0.3 0.1 1" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
@@ -13,5 +13,8 @@
 	<shadowcull value="ccw" />
 	<shadowcull value="ccw" />
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
+	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
+	<occlusion enable="true" />
 </material>
 </material>

+ 4 - 1
bin/Autoload/LargeData/Materials/PBR/HighRoughMetallic5.xml

@@ -3,7 +3,7 @@
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
-	<parameter name="MatDiffColor" value="1 1 1 1" />
+	<parameter name="MatDiffColor" value="0.8 0.3 0.1 1" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
@@ -13,5 +13,8 @@
 	<shadowcull value="ccw" />
 	<shadowcull value="ccw" />
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
+	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
+	<occlusion enable="true" />
 </material>
 </material>

+ 4 - 1
bin/Autoload/LargeData/Materials/PBR/HighRoughMetallic7.xml

@@ -3,7 +3,7 @@
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
-	<parameter name="MatDiffColor" value="1 1 1 1" />
+	<parameter name="MatDiffColor" value="0.8 0.3 0.1 1" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
@@ -13,5 +13,8 @@
 	<shadowcull value="ccw" />
 	<shadowcull value="ccw" />
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
+	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
+	<occlusion enable="true" />
 </material>
 </material>

+ 2 - 1
bin/Autoload/LargeData/Materials/PBR/Metallic0.xml

@@ -3,7 +3,7 @@
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
-	<parameter name="MatDiffColor" value="1 0.886 0.608 1" />
+	<parameter name="MatDiffColor" value="0.8 0.3 0.1 1" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
@@ -14,6 +14,7 @@
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
 	<alphatocoverage enable="false" />
 	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
 	<occlusion enable="true" />
 	<occlusion enable="true" />
 </material>
 </material>

+ 2 - 1
bin/Autoload/LargeData/Materials/PBR/Metallic10.xml

@@ -3,7 +3,7 @@
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
-	<parameter name="MatDiffColor" value="1 0.886 0.608 1" />
+	<parameter name="MatDiffColor" value="0.8 0.3 0.1 1" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
@@ -14,6 +14,7 @@
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
 	<alphatocoverage enable="false" />
 	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
 	<occlusion enable="true" />
 	<occlusion enable="true" />
 </material>
 </material>

+ 2 - 1
bin/Autoload/LargeData/Materials/PBR/Metallic3.xml

@@ -3,7 +3,7 @@
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
-	<parameter name="MatDiffColor" value="1 0.886 0.608 1" />
+	<parameter name="MatDiffColor" value="0.8 0.3 0.1 1" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
@@ -14,6 +14,7 @@
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
 	<alphatocoverage enable="false" />
 	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
 	<occlusion enable="true" />
 	<occlusion enable="true" />
 </material>
 </material>

+ 2 - 1
bin/Autoload/LargeData/Materials/PBR/Metallic5.xml

@@ -3,7 +3,7 @@
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
-	<parameter name="MatDiffColor" value="1 0.886 0.608 1" />
+	<parameter name="MatDiffColor" value="0.8 0.3 0.1 1" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
@@ -14,6 +14,7 @@
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
 	<alphatocoverage enable="false" />
 	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
 	<occlusion enable="true" />
 	<occlusion enable="true" />
 </material>
 </material>

+ 2 - 1
bin/Autoload/LargeData/Materials/PBR/Metallic7.xml

@@ -3,7 +3,7 @@
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
-	<parameter name="MatDiffColor" value="1 0.886 0.608 1" />
+	<parameter name="MatDiffColor" value="0.8 0.3 0.1 1" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
@@ -14,6 +14,7 @@
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
 	<alphatocoverage enable="false" />
 	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
 	<occlusion enable="true" />
 	<occlusion enable="true" />
 </material>
 </material>

+ 4 - 1
bin/Autoload/LargeData/Materials/PBR/MetallicRough0.xml

@@ -3,7 +3,7 @@
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
-	<parameter name="MatDiffColor" value="1 1 1 1" />
+	<parameter name="MatDiffColor" value="0 0.1 0.5 1" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
@@ -13,5 +13,8 @@
 	<shadowcull value="ccw" />
 	<shadowcull value="ccw" />
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
+	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
+	<occlusion enable="true" />
 </material>
 </material>

+ 2 - 1
bin/Autoload/LargeData/Materials/PBR/MetallicRough10.xml

@@ -3,7 +3,7 @@
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
-	<parameter name="MatDiffColor" value="1 1 1 1" />
+	<parameter name="MatDiffColor" value="0 0.1 0.5 1" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
@@ -14,6 +14,7 @@
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
 	<alphatocoverage enable="false" />
 	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
 	<occlusion enable="true" />
 	<occlusion enable="true" />
 </material>
 </material>

+ 4 - 1
bin/Autoload/LargeData/Materials/PBR/MetallicRough3.xml

@@ -3,7 +3,7 @@
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
-	<parameter name="MatDiffColor" value="1 1 1 1" />
+	<parameter name="MatDiffColor" value="0 0.1 0.5 1" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
@@ -13,5 +13,8 @@
 	<shadowcull value="ccw" />
 	<shadowcull value="ccw" />
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
+	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
+	<occlusion enable="true" />
 </material>
 </material>

+ 4 - 1
bin/Autoload/LargeData/Materials/PBR/MetallicRough5.xml

@@ -3,7 +3,7 @@
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
-	<parameter name="MatDiffColor" value="1 1 1 1" />
+	<parameter name="MatDiffColor" value="0 0.1 0.5 1" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
@@ -13,5 +13,8 @@
 	<shadowcull value="ccw" />
 	<shadowcull value="ccw" />
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
+	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
+	<occlusion enable="true" />
 </material>
 </material>

+ 2 - 1
bin/Autoload/LargeData/Materials/PBR/MetallicRough7.xml

@@ -3,7 +3,7 @@
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
-	<parameter name="MatDiffColor" value="1 1 1 1" />
+	<parameter name="MatDiffColor" value="0 0.1 0.5 1" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
@@ -14,6 +14,7 @@
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
 	<alphatocoverage enable="false" />
 	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
 	<occlusion enable="true" />
 	<occlusion enable="true" />
 </material>
 </material>

+ 2 - 1
bin/Autoload/LargeData/Materials/PBR/Mud.xml

@@ -10,13 +10,14 @@
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
-	<parameter name="Roughness" value="-0.12" />
+	<parameter name="Roughness" value="0" />
 	<parameter name="Metallic" value="0" />
 	<parameter name="Metallic" value="0" />
 	<cull value="ccw" />
 	<cull value="ccw" />
 	<shadowcull value="ccw" />
 	<shadowcull value="ccw" />
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
 	<alphatocoverage enable="false" />
 	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
 	<occlusion enable="true" />
 	<occlusion enable="true" />
 </material>
 </material>

+ 2 - 1
bin/Autoload/LargeData/Materials/PBR/Roughness0.xml

@@ -3,7 +3,7 @@
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
-	<parameter name="MatDiffColor" value="0.034 0.101 0.589 1" />
+	<parameter name="MatDiffColor" value="0 0.1 0.5 1" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
@@ -14,6 +14,7 @@
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
 	<alphatocoverage enable="false" />
 	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
 	<occlusion enable="true" />
 	<occlusion enable="true" />
 </material>
 </material>

+ 2 - 1
bin/Autoload/LargeData/Materials/PBR/Roughness10.xml

@@ -3,7 +3,7 @@
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
-	<parameter name="MatDiffColor" value="0.034 0.101 0.589 1" />
+	<parameter name="MatDiffColor" value="0 0.1 0.5 1" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
@@ -14,6 +14,7 @@
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
 	<alphatocoverage enable="false" />
 	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
 	<occlusion enable="true" />
 	<occlusion enable="true" />
 </material>
 </material>

+ 2 - 1
bin/Autoload/LargeData/Materials/PBR/Roughness3.xml

@@ -3,7 +3,7 @@
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
-	<parameter name="MatDiffColor" value="0.034 0.101 0.589 1" />
+	<parameter name="MatDiffColor" value="0 0.1 0.5 1" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
@@ -14,6 +14,7 @@
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
 	<alphatocoverage enable="false" />
 	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
 	<occlusion enable="true" />
 	<occlusion enable="true" />
 </material>
 </material>

+ 2 - 1
bin/Autoload/LargeData/Materials/PBR/Roughness5.xml

@@ -3,7 +3,7 @@
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
-	<parameter name="MatDiffColor" value="0.034 0.101 0.589 1" />
+	<parameter name="MatDiffColor" value="0 0.1 0.5 1" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
@@ -14,6 +14,7 @@
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
 	<alphatocoverage enable="false" />
 	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
 	<occlusion enable="true" />
 	<occlusion enable="true" />
 </material>
 </material>

+ 2 - 1
bin/Autoload/LargeData/Materials/PBR/Roughness7.xml

@@ -3,7 +3,7 @@
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<technique name="Techniques/PBR/PBRNoTexture.xml" quality="0" loddistance="0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="UOffset" value="1 0 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
 	<parameter name="VOffset" value="0 1 0 0" />
-	<parameter name="MatDiffColor" value="0.034 0.101 0.589 1" />
+	<parameter name="MatDiffColor" value="0 0.1 0.5 1" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEmissiveColor" value="0 0 0" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatEnvMapColor" value="1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
 	<parameter name="MatSpecColor" value="1 1 1 1" />
@@ -14,6 +14,7 @@
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
 	<alphatocoverage enable="false" />
 	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
 	<occlusion enable="true" />
 	<occlusion enable="true" />
 </material>
 </material>

+ 1 - 0
bin/Autoload/LargeData/Materials/PBR/Tile.xml

@@ -17,6 +17,7 @@
 	<fill value="solid" />
 	<fill value="solid" />
 	<depthbias constant="0" slopescaled="0" />
 	<depthbias constant="0" slopescaled="0" />
 	<alphatocoverage enable="false" />
 	<alphatocoverage enable="false" />
+	<lineantialias enable="false" />
 	<renderorder value="128" />
 	<renderorder value="128" />
 	<occlusion enable="true" />
 	<occlusion enable="true" />
 </material>
 </material>

+ 36 - 7
bin/CoreData/Shaders/GLSL/BRDF.glsl

@@ -21,12 +21,23 @@
         return specular + (vec3(1.0, 1.0, 1.0) - specular) * sphericalGaussian;
         return specular + (vec3(1.0, 1.0, 1.0) - specular) * sphericalGaussian;
     }
     }
 
 
+    vec3 SchlickFresnelCustom(vec3 specular, float LdotH)
+    {
+        float ior = 0.25;
+        float airIor = 1.000277;
+        float f0 = (ior - airIor) / (ior + airIor);
+        float max_ior = 2.5;
+        f0 = clamp(f0 * f0, 0.0, (max_ior - airIor) / (max_ior + airIor));
+        return specular * (f0   + (1 - f0) * pow(2, (-5.55473 * LdotH - 6.98316) * LdotH));
+    }
+
     //Get Fresnel
     //Get Fresnel
     //specular  = the rgb specular color value of the pixel
     //specular  = the rgb specular color value of the pixel
     //VdotH     = the dot product of the camera view direction and the half vector 
     //VdotH     = the dot product of the camera view direction and the half vector 
-    vec3 Fresnel(vec3 specular, float VdotH)
+    vec3 Fresnel(vec3 specular, float VdotH, float LdotH)
     {
     {
-        return SchlickFresnel(specular, VdotH);
+        return SchlickFresnelCustom(specular, LdotH);
+        //return SchlickFresnel(specular, VdotH);
     }
     }
 
 
     // Smith GGX corrected Visibility
     // Smith GGX corrected Visibility
@@ -42,13 +53,19 @@
         return 0.5 / (lambdaV + lambdaL);
         return 0.5 / (lambdaV + lambdaL);
     }
     }
 
 
+    float NeumannVisibility(float NdotV, float NdotL) 
+    {
+        return NdotL * NdotV / max(1e-7, max(NdotL, NdotV));
+    }
+
     // Get Visibility
     // Get Visibility
     // NdotL        = the dot product of the normal and direction to the light
     // NdotL        = the dot product of the normal and direction to the light
     // NdotV        = the dot product of the normal and the camera view direction
     // NdotV        = the dot product of the normal and the camera view direction
     // roughness    = the roughness of the pixel
     // roughness    = the roughness of the pixel
     float Visibility(float NdotL, float NdotV, float roughness)
     float Visibility(float NdotL, float NdotV, float roughness)
     {
     {
-        return SmithGGXSchlickVisibility(NdotL, NdotV, roughness);
+        return NeumannVisibility(NdotV, NdotL);
+        //return SmithGGXSchlickVisibility(NdotL, NdotV, roughness);
     }
     }
 
 
     // Blinn Distribution
     // Blinn Distribution
@@ -96,9 +113,20 @@
     // NdotV        = the normal dot with the camera view direction
     // NdotV        = the normal dot with the camera view direction
     // NdotL        = the normal dot with the light direction
     // NdotL        = the normal dot with the light direction
     // VdotH        = the camera view direction dot with the half vector
     // VdotH        = the camera view direction dot with the half vector
-    vec3 LambertianDiffuse(vec3 diffuseColor, float NdotL)
+    vec3 LambertianDiffuse(vec3 diffuseColor)
+    {
+        return diffuseColor * (1.0 / M_PI) ;
+    }
+
+    // Custom Lambertian Diffuse
+    // diffuseColor = the rgb color value of the pixel
+    // roughness    = the roughness of the pixel
+    // NdotV        = the normal dot with the camera view direction
+    // NdotL        = the normal dot with the light direction
+    // VdotH        = the camera view direction dot with the half vector
+    vec3 CustomLambertianDiffuse(vec3 diffuseColor, float NdotV, float roughness)
     {
     {
-        return diffuseColor * NdotL;
+        return diffuseColor * (1.0 / M_PI) * pow(NdotV, 0.5 + 0.3 * roughness);
     }
     }
 
 
     // Burley Diffuse
     // Burley Diffuse
@@ -127,8 +155,9 @@
     // VdotH        = the camera view direction dot with the half vector
     // VdotH        = the camera view direction dot with the half vector
     vec3 Diffuse(vec3 diffuseColor, float roughness, float NdotV, float NdotL, float VdotH)
     vec3 Diffuse(vec3 diffuseColor, float roughness, float NdotV, float NdotL, float VdotH)
     {
     {
-        //return LambertianDiffuse(diffuseColor, NdotL);
-        return BurleyDiffuse(diffuseColor, roughness, NdotV, NdotL, VdotH);
+        //return LambertianDiffuse(diffuseColor);
+        return CustomLambertianDiffuse(diffuseColor, NdotV, roughness);
+        //return BurleyDiffuse(diffuseColor, roughness, NdotV, NdotL, VdotH);
     }
     }
 
 
   #endif
   #endif

+ 1 - 1
bin/CoreData/Shaders/GLSL/Constants.glsl

@@ -2,6 +2,6 @@
 #define M_EPSILON 0.0001
 #define M_EPSILON 0.0001
 
 
 #ifdef PBR
 #ifdef PBR
-#define ROUGHNESS_FLOOR 0.003
+#define ROUGHNESS_FLOOR 0.004
 #define METALNESS_FLOOR 0.03
 #define METALNESS_FLOOR 0.03
 #endif
 #endif

+ 8 - 8
bin/CoreData/Shaders/GLSL/IBL.glsl

@@ -229,17 +229,16 @@
     ///     normal: surface normal
     ///     normal: surface normal
     ///     reflection: vector of reflection off of the surface
     ///     reflection: vector of reflection off of the surface
     ///     roughness: surface roughness
     ///     roughness: surface roughness
-    vec3 GetSpecularDominantDir(vec3 normal, vec3 reflection, float roughness)
-    {
-        float smoothness = 1.0 - roughness;
-        float lerpFactor = smoothness * (sqrt(smoothness) + roughness);
-        return mix(normal, reflection, lerpFactor);
-    }
+    // vec3 GetSpecularDominantDir(vec3 normal, vec3 reflection, float roughness)
+    // {
+    //     float smoothness = 1.0 - roughness;
+    //     float lerpFactor = smoothness * (sqrt(smoothness) + roughness);
+    //     return mix(normal, reflection, lerpFactor);
+    // }
 
 
     float GetMipFromRoughness(float roughness)
     float GetMipFromRoughness(float roughness)
     {
     {
-        float Level = 3 - 1.15 * log2( roughness );
-        return 9.0 - 1 - Level;
+        return (roughness * 12.0 - pow(roughness, 6.0) * 1.5);
     }
     }
 
 
 
 
@@ -273,6 +272,7 @@
     ///     ambientOcclusion: ambient occlusion
     ///     ambientOcclusion: ambient occlusion
     vec3 ImageBasedLighting(vec3 reflectVec, vec3 tangent, vec3 bitangent, vec3 wsNormal, vec3 toCamera, vec3 diffColor, vec3 specColor, float roughness, inout vec3 reflectionCubeColor)
     vec3 ImageBasedLighting(vec3 reflectVec, vec3 tangent, vec3 bitangent, vec3 wsNormal, vec3 toCamera, vec3 diffColor, vec3 specColor, float roughness, inout vec3 reflectionCubeColor)
     {
     {
+        roughness = max(roughness, 0.08);
         reflectVec = GetSpecularDominantDir(wsNormal, reflectVec, roughness);
         reflectVec = GetSpecularDominantDir(wsNormal, reflectVec, roughness);
         float ndv = clamp(dot(-toCamera, wsNormal), 0.0, 1.0);
         float ndv = clamp(dot(-toCamera, wsNormal), 0.0, 1.0);
 
 

+ 73 - 37
bin/CoreData/Shaders/GLSL/PBR.glsl

@@ -1,38 +1,70 @@
 #include "BRDF.glsl"
 #include "BRDF.glsl"
 #ifdef COMPILEPS
 #ifdef COMPILEPS
+#line 100
+    vec3 GetSpecularDominantDir(vec3 normal, vec3 reflection, float roughness)
+    {
+        float smoothness = 1.0 - roughness;
+        float lerpFactor = smoothness * (sqrt(smoothness) + roughness);
+        return mix(normal, reflection, lerpFactor);
+    }
 
 
-    vec3 SphereLight(vec3 worldPos, vec3 lightVec, vec3 normal, vec3 toCamera, float roughness, vec3 specColor, out float ndl)
+    vec3 SphereLight(vec3 worldPos, vec3 lightVec, vec3 normal, vec3 toCamera, float roughness, vec3 specColor, vec3 diffColor, out float ndl)
     {
     {
-        vec3 pos   = (cLightPosPS.xyz - worldPos);
-        float radius = cLightRad;
+        float specEnergy = 1.0f;
 
 
-        vec3 reflectVec   = reflect(-toCamera, normal);
-        vec3 centreToRay  = dot(pos, reflectVec) * reflectVec - pos;
-        vec3 closestPoint = pos + centreToRay * clamp(radius / length(centreToRay), 0.0, 1.0);
+        float radius = cLightRad / 100;
+        float rough2 = max(roughness, 0.08);
+        rough2 *= rough2;
 
 
-        vec3 l = normalize(closestPoint);
-        vec3 h = normalize(toCamera + l);
+        float radius2           = radius * radius;
+        float distToLightSqrd   = dot(lightVec,lightVec);
+        float invDistToLight    = inversesqrt(distToLightSqrd);
+        float sinAlphaSqr       = clamp(radius2 / distToLightSqrd, 0.0, 1.0);
+        float sinAlpha          = sqrt(sinAlphaSqr);
 
 
-        ndl       = clamp(dot(normal, l), 0.0, 1.0);
-        float hdn = clamp(dot(h, normal), 0.0, 1.0);
-        float hdv = dot(h, toCamera);
-        float ndv = clamp(dot(normal, toCamera), 0.0, 1.0);
+        ndl       = dot(normal, (lightVec * invDistToLight));
 
 
-        float distL      = length(pos);
-        float alpha      = roughness * roughness;
-        float alphaPrime = clamp(radius / (distL * 2.0) + alpha, 0.0, 1.0);
+        if(ndl < sinAlpha)
+        {
+            ndl = max(ndl, -sinAlpha);
+            ndl = ((sinAlpha + ndl) * (sinAlpha + ndl)) / (4 * sinAlpha);
+        }
+
+        float sphereAngle = clamp(radius * invDistToLight, 0.0, 1.0);
+                            
+        specEnergy = rough2 / (rough2 + 0.5f * sphereAngle);
+        specEnergy *= specEnergy;                           
 
 
-        vec3 fresnelTerm = Fresnel(specColor, hdv) ;
-        float distTerm     = Distribution(hdn, alphaPrime);
-        float visTerm      = Visibility(ndl, ndv, roughness);
+        vec3 R = 2 * dot(toCamera, normal) * normal - toCamera;
+        R = GetSpecularDominantDir(normal, R, roughness);
 
 
-        return distTerm * visTerm * fresnelTerm ;
+        // Find closest point on sphere to ray
+        vec3 closestPointOnRay = dot(lightVec, R) * R;
+        vec3 centerToRay = closestPointOnRay - lightVec;
+        float invDistToRay = inversesqrt(dot(centerToRay, centerToRay));
+        vec3 closestPointOnSphere = lightVec + centerToRay * clamp(radius * invDistToRay, 0.0, 1.0);
+
+        lightVec = closestPointOnSphere;
+        vec3 L = normalize(lightVec);
+
+        vec3 h = normalize(toCamera + L);
+        float hdn = clamp(dot(h, normal), 0.0, 1.0);
+        float hdv = dot(h, toCamera);
+        float ndv = clamp(dot(normal, toCamera),0.0, 1.0);
+        float hdl = clamp(dot(h, lightVec), 0.0, 1.0);
+
+        vec3 diffuseFactor = Diffuse(diffColor, roughness, ndv, ndl, hdv)  * ndl;
+        vec3 fresnelTerm = Fresnel(specColor, hdv, hdl) ;
+        float distTerm = Distribution(hdn, roughness);
+        float visTerm = Visibility(ndl, ndv, roughness);
+        vec3 specularFactor = distTerm * visTerm * fresnelTerm * ndl/ M_PI;
+        return diffuseFactor + specularFactor;
     }
     }
 
 
-    vec3 TubeLight(vec3 worldPos, vec3 lightVec, vec3 normal, vec3 toCamera, float roughness, vec3 specColor, out float ndl)
+    vec3 TubeLight(vec3 worldPos, vec3 lightVec, vec3 normal, vec3 toCamera, float roughness, vec3 specColor, vec3 diffColor, out float ndl)
     {
     {
-        float radius      = cLightRad;
-        float len         = cLightLength; 
+        float radius      = cLightRad / 100;
+        float len         = cLightLength / 10; 
         vec3 pos         = (cLightPosPS.xyz - worldPos);
         vec3 pos         = (cLightPosPS.xyz - worldPos);
         vec3 reflectVec  = reflect(-toCamera, normal);
         vec3 reflectVec  = reflect(-toCamera, normal);
         
         
@@ -60,20 +92,22 @@
         vec3 l = normalize(closestPoint);
         vec3 l = normalize(closestPoint);
         vec3 h = normalize(toCamera + l);
         vec3 h = normalize(toCamera + l);
 
 
-        ndl       =  clamp(dot(normal, lightVec), 0.0, 1.0);
+        ndl       = clamp(dot(normal, lightVec), 0.0, 1.0);
         float hdn = clamp(dot(h, normal), 0.0, 1.0);
         float hdn = clamp(dot(h, normal), 0.0, 1.0);
         float hdv = dot(h, toCamera);
         float hdv = dot(h, toCamera);
-        float ndv = clamp(dot(normal, toCamera), 0.0 ,1.0);
+        float ndv = clamp(dot(normal, toCamera), 0.0, 1.0);
+        float hdl = clamp(dot(h, lightVec), 0.0, 1.0);
 
 
         float distL      = length(closestPoint);
         float distL      = length(closestPoint);
-        float alpha      = roughness * roughness;
+        float alpha      = max(roughness, 0.08) * max(roughness, 0.08);
         float alphaPrime = clamp(radius / (distL * 2.0) + alpha, 0.0, 1.0);
         float alphaPrime = clamp(radius / (distL * 2.0) + alpha, 0.0, 1.0);
 
 
-        vec3 fresnelTerm = Fresnel(specColor, hdv) ;
-        float distTerm     = Distribution(hdn, alphaPrime);
-        float visTerm      = Visibility(ndl, ndv, roughness);
-
-        return distTerm * visTerm * fresnelTerm ;
+        vec3 diffuseFactor = Diffuse(diffColor, roughness, ndv, ndl, hdv)  * ndl;
+        vec3 fresnelTerm = Fresnel(specColor, hdv, hdl) ;
+        float distTerm = Distribution(hdn, roughness);
+        float visTerm = Visibility(ndl, ndv, roughness);
+        vec3 specularFactor = distTerm * visTerm * fresnelTerm * ndl/ M_PI;
+        return diffuseFactor + specularFactor;
     }
     }
 
 
 	//Return the PBR BRDF value
 	//Return the PBR BRDF value
@@ -87,10 +121,11 @@
 	vec3 GetBRDF(vec3 worldPos, vec3 lightDir, vec3 lightVec, vec3 toCamera, vec3 normal, float roughness, vec3 diffColor, vec3 specColor)
 	vec3 GetBRDF(vec3 worldPos, vec3 lightDir, vec3 lightVec, vec3 toCamera, vec3 normal, float roughness, vec3 diffColor, vec3 specColor)
 	{
 	{
         vec3 Hn = normalize(toCamera + lightDir);
         vec3 Hn = normalize(toCamera + lightDir);
-        float vdh = clamp((dot(toCamera, Hn)), M_EPSILON, 1.0);
-        float ndh = clamp((dot(normal, Hn)), M_EPSILON, 1.0);
-        float ndl = clamp((dot(normal, lightVec)), M_EPSILON, 1.0);
-        float ndv = clamp((dot(normal, toCamera)), M_EPSILON, 1.0);
+        float vdh = clamp(dot(toCamera, Hn), M_EPSILON, 1.0);
+        float ndh = clamp(dot(normal, Hn), M_EPSILON, 1.0);
+        float ndl = clamp(dot(normal, lightVec), M_EPSILON, 1.0);
+        float ldh = clamp(dot(lightVec, Hn), M_EPSILON, 1.0);
+        float ndv = abs(dot(normal, toCamera)) + 1e-5;
 
 
         vec3 diffuseFactor = Diffuse(diffColor, roughness, ndv, ndl, vdh);
         vec3 diffuseFactor = Diffuse(diffColor, roughness, ndv, ndl, vdh);
         vec3 specularFactor = vec3(0.0, 0.0, 0.0);
         vec3 specularFactor = vec3(0.0, 0.0, 0.0);
@@ -100,22 +135,23 @@
             {
             {
                 if(cLightLength > 0.0)
                 if(cLightLength > 0.0)
                 {
                 {
-                    specularFactor = TubeLight(worldPos, lightVec, normal, toCamera, roughness, specColor, ndl);
+                    specularFactor = TubeLight(worldPos, lightVec, normal, toCamera, roughness, specColor, diffColor, ndl);
                     specularFactor *= ndl;
                     specularFactor *= ndl;
                 }
                 }
                 else
                 else
                 {
                 {
-                    specularFactor = SphereLight(worldPos, lightVec, normal, toCamera, roughness, specColor, ndl);
+                    specularFactor = SphereLight(worldPos, lightVec, normal, toCamera, roughness, specColor, diffColor, ndl);
                     specularFactor *= ndl;
                     specularFactor *= ndl;
                 }
                 }
             }
             }
             else
             else
             {
             {
-                vec3 fresnelTerm = Fresnel(specColor, vdh) ;
+                vec3 fresnelTerm = Fresnel(specColor, vdh, ldh) ;
                 float distTerm = Distribution(ndh, roughness);
                 float distTerm = Distribution(ndh, roughness);
                 float visTerm = Visibility(ndl, ndv, roughness);
                 float visTerm = Visibility(ndl, ndv, roughness);
 
 
                 specularFactor = fresnelTerm * distTerm * visTerm  / M_PI;
                 specularFactor = fresnelTerm * distTerm * visTerm  / M_PI;
+                return diffuseFactor + specularFactor;
             }
             }
         #endif
         #endif
 
 

+ 36 - 7
bin/CoreData/Shaders/HLSL/BRDF.hlsl

@@ -21,12 +21,23 @@
         return specular + (float3(1.0, 1.0, 1.0) - specular) * sphericalGaussian;
         return specular + (float3(1.0, 1.0, 1.0) - specular) * sphericalGaussian;
     }
     }
 
 
+    float3 SchlickFresnelCustom(float3 specular, float LdotH)
+    {
+        float ior = 0.25;
+        float airIor = 1.000277;
+        float f0 = (ior - airIor) / (ior + airIor);
+        const float max_ior = 2.5;
+        f0 = clamp(f0 * f0, 0.0, (max_ior - airIor) / (max_ior + airIor));
+        return specular * (f0   + (1 - f0) * pow(2, (-5.55473 * LdotH - 6.98316) * LdotH));
+    }
+
     //Get Fresnel
     //Get Fresnel
     //specular  = the rgb specular color value of the pixel
     //specular  = the rgb specular color value of the pixel
     //VdotH     = the dot product of the camera view direction and the half vector 
     //VdotH     = the dot product of the camera view direction and the half vector 
-    float3 Fresnel(float3 specular, float VdotH)
+    float3 Fresnel(float3 specular, float VdotH, float LdotH)
     {
     {
-        return SchlickFresnel(specular, VdotH);
+        return SchlickFresnelCustom(specular, LdotH);
+        //return SchlickFresnel(specular, VdotH);
     }
     }
 
 
     // Smith GGX corrected Visibility
     // Smith GGX corrected Visibility
@@ -42,13 +53,19 @@
         return 0.5 / (lambdaV + lambdaL);
         return 0.5 / (lambdaV + lambdaL);
     }
     }
 
 
+    float NeumannVisibility(float NdotV, float NdotL) 
+    {
+        return NdotL * NdotV / max(1e-7, max(NdotL, NdotV));
+    }
+
     // Get Visibility
     // Get Visibility
     // NdotL        = the dot product of the normal and direction to the light
     // NdotL        = the dot product of the normal and direction to the light
     // NdotV        = the dot product of the normal and the camera view direction
     // NdotV        = the dot product of the normal and the camera view direction
     // roughness    = the roughness of the pixel
     // roughness    = the roughness of the pixel
     float Visibility(float NdotL, float NdotV, float roughness)
     float Visibility(float NdotL, float NdotV, float roughness)
     {
     {
-        return SmithGGXSchlickVisibility(NdotL, NdotV, roughness);
+        return NeumannVisibility(NdotV, NdotL);
+        //return SmithGGXSchlickVisibility(NdotL, NdotV, roughness);
     }
     }
 
 
     // GGX Distribution
     // GGX Distribution
@@ -96,9 +113,20 @@
     // NdotV        = the normal dot with the camera view direction
     // NdotV        = the normal dot with the camera view direction
     // NdotL        = the normal dot with the light direction
     // NdotL        = the normal dot with the light direction
     // VdotH        = the camera view direction dot with the half vector
     // VdotH        = the camera view direction dot with the half vector
-    float3 LambertianDiffuse(float3 diffuseColor, float NdotL)
+    float3 LambertianDiffuse(float3 diffuseColor)
+    {
+        return diffuseColor * (1.0 / M_PI) ;
+    }
+
+    // Custom Lambertian Diffuse
+    // diffuseColor = the rgb color value of the pixel
+    // roughness    = the roughness of the pixel
+    // NdotV        = the normal dot with the camera view direction
+    // NdotL        = the normal dot with the light direction
+    // VdotH        = the camera view direction dot with the half vector
+    float3 CustomLambertianDiffuse(float3 diffuseColor, float NdotV, float roughness)
     {
     {
-        return diffuseColor * NdotL;
+        return diffuseColor * (1.0 / M_PI) * pow(NdotV, 0.5 + 0.3 * roughness);
     }
     }
 
 
     // Burley Diffuse
     // Burley Diffuse
@@ -127,8 +155,9 @@
     // VdotH        = the camera view direction dot with the half vector
     // VdotH        = the camera view direction dot with the half vector
     float3 Diffuse(float3 diffuseColor, float roughness, float NdotV, float NdotL, float VdotH)
     float3 Diffuse(float3 diffuseColor, float roughness, float NdotV, float NdotL, float VdotH)
     {
     {
-        //return LambertianDiffuse(diffuseColor, NdotL);
-        return BurleyDiffuse(diffuseColor, roughness, NdotV, NdotL, VdotH);
+        //return LambertianDiffuse(diffuseColor);
+        return CustomLambertianDiffuse(diffuseColor, NdotV, roughness);
+        //return BurleyDiffuse(diffuseColor, roughness, NdotV, NdotL, VdotH);
     }
     }
 
 
   #endif
   #endif

+ 1 - 1
bin/CoreData/Shaders/HLSL/Constants.hlsl

@@ -2,6 +2,6 @@
 #define M_EPSILON 0.0001
 #define M_EPSILON 0.0001
 
 
 #ifdef PBR
 #ifdef PBR
-#define ROUGHNESS_FLOOR 0.003
+#define ROUGHNESS_FLOOR 0.004
 #define METALNESS_FLOOR 0.03
 #define METALNESS_FLOOR 0.03
 #endif
 #endif

+ 8 - 8
bin/CoreData/Shaders/HLSL/IBL.hlsl

@@ -220,17 +220,16 @@
     ///     normal: surface normal
     ///     normal: surface normal
     ///     reflection: vector of reflection off of the surface
     ///     reflection: vector of reflection off of the surface
     ///     roughness: surface roughness
     ///     roughness: surface roughness
-    float3 GetSpecularDominantDir(float3 normal, float3 reflection, float roughness)
-    {
-        const float smoothness = 1.0 - roughness;
-        const float lerpFactor = smoothness * (sqrt(smoothness) + roughness);
-        return lerp(normal, reflection, lerpFactor);
-    }
+    // float3 GetSpecularDominantDir(float3 normal, float3 reflection, float roughness)
+    // {
+    //     const float smoothness = 1.0 - roughness;
+    //     const float lerpFactor = smoothness * (sqrt(smoothness) + roughness);
+    //     return lerp(normal, reflection, lerpFactor);
+    // }
 
 
     float GetMipFromRoughness(float roughness)
     float GetMipFromRoughness(float roughness)
     {
     {
-        float Level = 3 - 1.15 * log2( roughness );
-        return 9.0 - 1 - Level;
+        return (roughness * 12.0 - pow(roughness, 6.0) * 1.5);
     }
     }
 
 
 
 
@@ -264,6 +263,7 @@
     ///     ambientOcclusion: ambient occlusion
     ///     ambientOcclusion: ambient occlusion
     float3 ImageBasedLighting(in float3 reflectVec, in float3 tangent, in float3 bitangent, in float3 wsNormal, in float3 toCamera, in float3 diffColor, in float3 specColor, in float roughness, inout float3 reflectionCubeColor)
     float3 ImageBasedLighting(in float3 reflectVec, in float3 tangent, in float3 bitangent, in float3 wsNormal, in float3 toCamera, in float3 diffColor, in float3 specColor, in float roughness, inout float3 reflectionCubeColor)
     { 
     { 
+        roughness = max(roughness, 0.08);
         reflectVec = GetSpecularDominantDir(wsNormal, reflectVec, roughness);
         reflectVec = GetSpecularDominantDir(wsNormal, reflectVec, roughness);
         const float ndv = saturate(dot(-toCamera, wsNormal));
         const float ndv = saturate(dot(-toCamera, wsNormal));
 
 

+ 66 - 32
bin/CoreData/Shaders/HLSL/PBR.hlsl

@@ -1,40 +1,71 @@
 #include "BRDF.hlsl"
 #include "BRDF.hlsl"
 #ifdef COMPILEPS
 #ifdef COMPILEPS
 
 
-    
+    float3 GetSpecularDominantDir(float3 normal, float3 reflection, float roughness)
+    {
+        const float smoothness = 1.0 - roughness;
+        const float lerpFactor = smoothness * (sqrt(smoothness) + roughness);
+        return lerp(normal, reflection, lerpFactor);
+    }
 
 
-    float3 SphereLight(float3 worldPos, float3 lightVec, float3 normal, float3 toCamera, float roughness, float3 specColor, out float ndl)
+    float3 SphereLight(float3 worldPos, float3 lightVec, float3 normal, float3 toCamera, float roughness, float3 specColor, float3 diffColor, out float ndl)
     {
     {
-        float3 pos   = (cLightPosPS.xyz - worldPos);
-        float radius = cLightRad;
+        float specEnergy = 1.0f;
 
 
-        float3 reflectVec   = reflect(-toCamera, normal);
-        float3 centreToRay  = dot(pos, reflectVec) * reflectVec - pos;
-        float3 closestPoint = pos + centreToRay * saturate(radius / length(centreToRay));
+        float radius = cLightRad / 100;
+        float rough2 = max(roughness, 0.08);
+        rough2 *= rough2;
 
 
-        float3 l = normalize(closestPoint);
-        float3 h = normalize(toCamera + l);
+        float radius2           = radius * radius;
+        float distToLightSqrd   = dot(lightVec,lightVec);
+        float invDistToLight    = rsqrt(distToLightSqrd);
+        float sinAlphaSqr       = saturate(radius2 / distToLightSqrd);
+        float sinAlpha          = sqrt(sinAlphaSqr);
+
+        ndl       = dot(normal, (lightVec * invDistToLight));
+
+        if(ndl < sinAlpha)
+        {
+            ndl = max(ndl, -sinAlpha);
+            ndl = ((sinAlpha + ndl) * (sinAlpha + ndl)) / (4 * sinAlpha);
+        }
+
+        float sphereAngle = saturate(radius * invDistToLight);
+                            
+        specEnergy = rough2 / (rough2 + 0.5f * sphereAngle);
+        specEnergy *= specEnergy;                           
 
 
-        ndl       = saturate(dot(normal, l));
+        float3 R = 2 * dot(toCamera, normal) * normal - toCamera;
+        R = GetSpecularDominantDir(normal, R, roughness);
+
+        // Find closest point on sphere to ray
+        float3 closestPointOnRay = dot(lightVec, R) * R;
+        float3 centerToRay = closestPointOnRay - lightVec;
+        float invDistToRay = rsqrt(dot(centerToRay, centerToRay));
+        float3 closestPointOnSphere = lightVec + centerToRay * saturate(radius * invDistToRay);
+
+        lightVec = closestPointOnSphere;
+        float3 L = normalize(lightVec);
+
+        float3 h = normalize(toCamera + L);
         float hdn = saturate(dot(h, normal));
         float hdn = saturate(dot(h, normal));
         float hdv = dot(h, toCamera);
         float hdv = dot(h, toCamera);
         float ndv = saturate(dot(normal, toCamera));
         float ndv = saturate(dot(normal, toCamera));
+        float hdl = saturate(dot(h, lightVec));
 
 
-        float distL      = length(pos);
-        float alpha      = roughness * roughness;
-        float alphaPrime = saturate(radius / (distL * 2.0) + alpha);
-
-        const float3 fresnelTerm = Fresnel(specColor, hdv) ;
-        const float distTerm     = Distribution(hdn, alphaPrime);
-        const float visTerm      = Visibility(ndl, ndv, roughness);
+        const float3 diffuseFactor = Diffuse(diffColor, roughness, ndv, ndl, hdv)  * ndl;
+        const float3 fresnelTerm = Fresnel(specColor, hdv, hdl) ;
+        const float distTerm = Distribution(hdn, roughness);
+        const float visTerm = Visibility(ndl, ndv, roughness);
+        float3 specularFactor = distTerm * visTerm * fresnelTerm * ndl/ M_PI;
+        return diffuseFactor + specularFactor;
 
 
-        return distTerm * visTerm * fresnelTerm ;
     }
     }
 
 
-    float3 TubeLight(float3 worldPos, float3 lightVec, float3 normal, float3 toCamera, float roughness, float3 specColor, out float ndl)
+    float3 TubeLight(float3 worldPos, float3 lightVec, float3 normal, float3 toCamera, float roughness, float3 specColor, float3 diffColor, out float ndl)
     {
     {
-         float radius      = cLightRad;
-         float len         = cLightLength; 
+        float radius      = cLightRad / 100;
+        float len         = cLightLength / 10; 
         float3 pos         = (cLightPosPS.xyz - worldPos);
         float3 pos         = (cLightPosPS.xyz - worldPos);
         float3 reflectVec  = reflect(-toCamera, normal);
         float3 reflectVec  = reflect(-toCamera, normal);
         
         
@@ -66,16 +97,18 @@
         float hdn = saturate(dot(h, normal));
         float hdn = saturate(dot(h, normal));
         float hdv = dot(h, toCamera);
         float hdv = dot(h, toCamera);
         float ndv = saturate(dot(normal, toCamera));
         float ndv = saturate(dot(normal, toCamera));
+        float hdl = saturate(dot(h, lightVec));
 
 
         float distL      = length(closestPoint);
         float distL      = length(closestPoint);
-        float alpha      = roughness * roughness;
+        float alpha      = max(roughness, 0.08) * max(roughness, 0.08);
         float alphaPrime = saturate(radius / (distL * 2.0) + alpha);
         float alphaPrime = saturate(radius / (distL * 2.0) + alpha);
 
 
-        const float3 fresnelTerm = Fresnel(specColor, hdv) ;
-        const float distTerm     = Distribution(hdn, alphaPrime);
-        const float visTerm      = Visibility(ndl, ndv, roughness);
-
-        return distTerm * visTerm * fresnelTerm ;
+       const float3 diffuseFactor = Diffuse(diffColor, roughness, ndv, ndl, hdv)  * ndl;
+       const float3 fresnelTerm = Fresnel(specColor, hdv, hdl) ;
+       const float distTerm = Distribution(hdn, roughness);
+       const float visTerm = Visibility(ndl, ndv, roughness);
+       float3 specularFactor = distTerm * visTerm * fresnelTerm * ndl/ M_PI;
+       return diffuseFactor + specularFactor;
     }
     }
 
 
 	//Return the PBR BRDF value
 	//Return the PBR BRDF value
@@ -94,6 +127,7 @@
         const float ndh = clamp((dot(normal, Hn)), M_EPSILON, 1.0);
         const float ndh = clamp((dot(normal, Hn)), M_EPSILON, 1.0);
         float ndl = clamp((dot(normal, lightVec)), M_EPSILON, 1.0);
         float ndl = clamp((dot(normal, lightVec)), M_EPSILON, 1.0);
         const float ndv = clamp((dot(normal, toCamera)), M_EPSILON, 1.0);
         const float ndv = clamp((dot(normal, toCamera)), M_EPSILON, 1.0);
+        const float ldh = clamp((dot(lightVec, Hn)), M_EPSILON, 1.0);
 
 
         const float3 diffuseFactor = Diffuse(diffColor, roughness, ndv, ndl, vdh)  * ndl;
         const float3 diffuseFactor = Diffuse(diffColor, roughness, ndv, ndl, vdh)  * ndl;
         float3 specularFactor = 0;
         float3 specularFactor = 0;
@@ -103,21 +137,21 @@
             {
             {
                 if(cLightLength > 0.0)
                 if(cLightLength > 0.0)
                 {
                 {
-                    specularFactor = TubeLight(worldPos, lightVec, normal, toCamera, roughness, specColor, ndl);
-                    specularFactor *= ndl;
+                    return TubeLight(worldPos, lightVec, normal, toCamera, roughness, specColor, diffColor, ndl);
+                    
                 }
                 }
                 else
                 else
                 {
                 {
-                    specularFactor = SphereLight(worldPos, lightVec, normal, toCamera, roughness, specColor, ndl);
-                    specularFactor *= ndl;
+                    return SphereLight(worldPos, lightVec, normal, toCamera, roughness, specColor, diffColor, ndl);
                 }
                 }
             }
             }
             else
             else
             {
             {
-                const float3 fresnelTerm = Fresnel(specColor, vdh) ;
+                const float3 fresnelTerm = Fresnel(specColor, vdh, ldh) ;
                 const float distTerm = Distribution(ndh, roughness);
                 const float distTerm = Distribution(ndh, roughness);
                 const float visTerm = Visibility(ndl, ndv, roughness);
                 const float visTerm = Visibility(ndl, ndv, roughness);
                 specularFactor = distTerm * visTerm * fresnelTerm * ndl/ M_PI;
                 specularFactor = distTerm * visTerm * fresnelTerm * ndl/ M_PI;
+                return diffuseFactor + specularFactor;
             }
             }
 
 
         #endif
         #endif

+ 2 - 0
bin/Data/LuaScripts/42_PBRMaterials.lua

@@ -155,6 +155,8 @@ function SetupViewport()
     local effectRenderPath = viewport:GetRenderPath():Clone()
     local effectRenderPath = viewport:GetRenderPath():Clone()
     effectRenderPath:Append(cache:GetResource("XMLFile", "PostProcess/FXAA2.xml"))
     effectRenderPath:Append(cache:GetResource("XMLFile", "PostProcess/FXAA2.xml"))
     effectRenderPath:Append(cache:GetResource("XMLFile", "PostProcess/GammaCorrection.xml"))
     effectRenderPath:Append(cache:GetResource("XMLFile", "PostProcess/GammaCorrection.xml"))
+    effectRenderPath:Append(cache:GetResource("XMLFile", "PostProcess/Tonemap.xml"))
+    effectRenderPath:Append(cache:GetResource("XMLFile", "PostProcess/AutoExposure.xml"))
 
 
     viewport.renderPath = effectRenderPath;
     viewport.renderPath = effectRenderPath;
 end
 end

+ 857 - 190
bin/Data/Scenes/PBRExample.xml

@@ -5,10 +5,10 @@
 	<attribute name="Smoothing Constant" value="50" />
 	<attribute name="Smoothing Constant" value="50" />
 	<attribute name="Snap Threshold" value="5" />
 	<attribute name="Snap Threshold" value="5" />
 	<attribute name="Elapsed Time" value="152.788" />
 	<attribute name="Elapsed Time" value="152.788" />
-	<attribute name="Next Replicated Node ID" value="408" />
-	<attribute name="Next Replicated Component ID" value="428" />
-	<attribute name="Next Local Node ID" value="16777274" />
-	<attribute name="Next Local Component ID" value="16777889" />
+	<attribute name="Next Replicated Node ID" value="465" />
+	<attribute name="Next Replicated Component ID" value="485" />
+	<attribute name="Next Local Node ID" value="16777280" />
+	<attribute name="Next Local Component ID" value="16777961" />
 	<attribute name="Variables" />
 	<attribute name="Variables" />
 	<attribute name="Variable Names" value="" />
 	<attribute name="Variable Names" value="" />
 	<component type="Octree" id="1" />
 	<component type="Octree" id="1" />
@@ -32,7 +32,7 @@
 			<attribute name="Variables" />
 			<attribute name="Variables" />
 			<component type="StaticModel" id="3">
 			<component type="StaticModel" id="3">
 				<attribute name="Model" value="Model;Models/Plane.mdl" />
 				<attribute name="Model" value="Model;Models/Plane.mdl" />
-				<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+				<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 			</component>
 			</component>
 		</node>
 		</node>
 		<node id="31">
 		<node id="31">
@@ -45,7 +45,7 @@
 			<attribute name="Variables" />
 			<attribute name="Variables" />
 			<component type="StaticModel" id="33">
 			<component type="StaticModel" id="33">
 				<attribute name="Model" value="Model;Models/Plane.mdl" />
 				<attribute name="Model" value="Model;Models/Plane.mdl" />
-				<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+				<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 			</component>
 			</component>
 		</node>
 		</node>
 		<node id="32">
 		<node id="32">
@@ -58,14 +58,14 @@
 			<attribute name="Variables" />
 			<attribute name="Variables" />
 			<component type="StaticModel" id="34">
 			<component type="StaticModel" id="34">
 				<attribute name="Model" value="Model;Models/Plane.mdl" />
 				<attribute name="Model" value="Model;Models/Plane.mdl" />
-				<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+				<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 			</component>
 			</component>
 		</node>
 		</node>
 		<node id="22">
 		<node id="22">
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Name" value="Box" />
 			<attribute name="Name" value="Box" />
 			<attribute name="Tags" />
 			<attribute name="Tags" />
-			<attribute name="Position" value="1.16697 1.83612 3.88357" />
+			<attribute name="Position" value="10.667 1.83612 3.88357" />
 			<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
 			<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
 			<attribute name="Scale" value="3 3 1" />
 			<attribute name="Scale" value="3 3 1" />
 			<attribute name="Variables" />
 			<attribute name="Variables" />
@@ -93,7 +93,7 @@
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Name" value="Box" />
 			<attribute name="Name" value="Box" />
 			<attribute name="Tags" />
 			<attribute name="Tags" />
-			<attribute name="Position" value="1.16697 1.83612 -19.9362" />
+			<attribute name="Position" value="10.667 1.83612 -22.9362" />
 			<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
 			<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
 			<attribute name="Scale" value="3 3 1" />
 			<attribute name="Scale" value="3 3 1" />
 			<attribute name="Variables" />
 			<attribute name="Variables" />
@@ -121,7 +121,7 @@
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Name" value="Box" />
 			<attribute name="Name" value="Box" />
 			<attribute name="Tags" />
 			<attribute name="Tags" />
-			<attribute name="Position" value="-4.33303 1.83612 -19.9362" />
+			<attribute name="Position" value="-4.33303 1.83612 -22.9362" />
 			<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
 			<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
 			<attribute name="Scale" value="3 3 1" />
 			<attribute name="Scale" value="3 3 1" />
 			<attribute name="Variables" />
 			<attribute name="Variables" />
@@ -135,7 +135,7 @@
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Name" value="Box" />
 			<attribute name="Name" value="Box" />
 			<attribute name="Tags" />
 			<attribute name="Tags" />
-			<attribute name="Position" value="1.16697 1.83612 0.88357" />
+			<attribute name="Position" value="10.667 1.83612 0.88357" />
 			<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
 			<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
 			<attribute name="Scale" value="3 3 1" />
 			<attribute name="Scale" value="3 3 1" />
 			<attribute name="Variables" />
 			<attribute name="Variables" />
@@ -149,7 +149,7 @@
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Name" value="Box" />
 			<attribute name="Name" value="Box" />
 			<attribute name="Tags" />
 			<attribute name="Tags" />
-			<attribute name="Position" value="-1.33303 1.83612 -19.9362" />
+			<attribute name="Position" value="-1.33303 1.83612 -22.9362" />
 			<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
 			<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
 			<attribute name="Scale" value="3 3 1" />
 			<attribute name="Scale" value="3 3 1" />
 			<attribute name="Variables" />
 			<attribute name="Variables" />
@@ -191,7 +191,7 @@
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Name" value="Box" />
 			<attribute name="Name" value="Box" />
 			<attribute name="Tags" />
 			<attribute name="Tags" />
-			<attribute name="Position" value="1.16697 1.83612 -11.1164" />
+			<attribute name="Position" value="10.667 1.83612 -11.1164" />
 			<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
 			<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
 			<attribute name="Scale" value="3 3 1" />
 			<attribute name="Scale" value="3 3 1" />
 			<attribute name="Variables" />
 			<attribute name="Variables" />
@@ -219,7 +219,7 @@
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Name" value="Box" />
 			<attribute name="Name" value="Box" />
 			<attribute name="Tags" />
 			<attribute name="Tags" />
-			<attribute name="Position" value="0.66697 1.83612 -8.11643" />
+			<attribute name="Position" value="10.667 1.83612 -8.11643" />
 			<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
 			<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
 			<attribute name="Scale" value="3 3 1" />
 			<attribute name="Scale" value="3 3 1" />
 			<attribute name="Variables" />
 			<attribute name="Variables" />
@@ -257,34 +257,6 @@
 				<attribute name="Cast Shadows" value="true" />
 				<attribute name="Cast Shadows" value="true" />
 			</component>
 			</component>
 		</node>
 		</node>
-		<node id="85">
-			<attribute name="Is Enabled" value="true" />
-			<attribute name="Name" value="Box" />
-			<attribute name="Tags" />
-			<attribute name="Position" value="10.6654 1.35842 -9.11643" />
-			<attribute name="Rotation" value="-2.98023e-08 0 1 0" />
-			<attribute name="Scale" value="3 3 1" />
-			<attribute name="Variables" />
-			<component type="StaticModel" id="95">
-				<attribute name="Model" value="Model;Models/Box.mdl" />
-				<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
-				<attribute name="Cast Shadows" value="true" />
-			</component>
-		</node>
-		<node id="86">
-			<attribute name="Is Enabled" value="true" />
-			<attribute name="Name" value="Box" />
-			<attribute name="Tags" />
-			<attribute name="Position" value="10.5963 1.35842 -22.1142" />
-			<attribute name="Rotation" value="-2.98023e-08 0 1 0" />
-			<attribute name="Scale" value="3 3 1" />
-			<attribute name="Variables" />
-			<component type="StaticModel" id="96">
-				<attribute name="Model" value="Model;Models/Box.mdl" />
-				<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
-				<attribute name="Cast Shadows" value="true" />
-			</component>
-		</node>
 		<node id="72">
 		<node id="72">
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Name" value="Plane" />
 			<attribute name="Name" value="Plane" />
@@ -295,7 +267,7 @@
 			<attribute name="Variables" />
 			<attribute name="Variables" />
 			<component type="StaticModel" id="82">
 			<component type="StaticModel" id="82">
 				<attribute name="Model" value="Model;Models/Plane.mdl" />
 				<attribute name="Model" value="Model;Models/Plane.mdl" />
-				<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+				<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 			</component>
 			</component>
 		</node>
 		</node>
 		<node id="73">
 		<node id="73">
@@ -308,7 +280,7 @@
 			<attribute name="Variables" />
 			<attribute name="Variables" />
 			<component type="StaticModel" id="83">
 			<component type="StaticModel" id="83">
 				<attribute name="Model" value="Model;Models/Plane.mdl" />
 				<attribute name="Model" value="Model;Models/Plane.mdl" />
-				<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+				<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 			</component>
 			</component>
 		</node>
 		</node>
 		<node id="74">
 		<node id="74">
@@ -334,7 +306,7 @@
 			<attribute name="Variables" />
 			<attribute name="Variables" />
 			<component type="StaticModel" id="85">
 			<component type="StaticModel" id="85">
 				<attribute name="Model" value="Model;Models/Plane.mdl" />
 				<attribute name="Model" value="Model;Models/Plane.mdl" />
-				<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+				<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 			</component>
 			</component>
 		</node>
 		</node>
 		<node id="76">
 		<node id="76">
@@ -347,7 +319,7 @@
 			<attribute name="Variables" />
 			<attribute name="Variables" />
 			<component type="StaticModel" id="86">
 			<component type="StaticModel" id="86">
 				<attribute name="Model" value="Model;Models/Plane.mdl" />
 				<attribute name="Model" value="Model;Models/Plane.mdl" />
-				<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+				<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 			</component>
 			</component>
 		</node>
 		</node>
 		<node id="77">
 		<node id="77">
@@ -521,7 +493,7 @@
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Name" value="Box" />
 			<attribute name="Name" value="Box" />
 			<attribute name="Tags" />
 			<attribute name="Tags" />
-			<attribute name="Position" value="1.16697 1.83612 -5.11643" />
+			<attribute name="Position" value="10.667 1.83612 -5.11643" />
 			<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
 			<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
 			<attribute name="Scale" value="3 3 1" />
 			<attribute name="Scale" value="3 3 1" />
 			<attribute name="Variables" />
 			<attribute name="Variables" />
@@ -563,7 +535,7 @@
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Name" value="Box" />
 			<attribute name="Name" value="Box" />
 			<attribute name="Tags" />
 			<attribute name="Tags" />
-			<attribute name="Position" value="1.16697 1.83612 -2.11643" />
+			<attribute name="Position" value="10.667 1.83612 -2.11643" />
 			<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
 			<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
 			<attribute name="Scale" value="3 3 1" />
 			<attribute name="Scale" value="3 3 1" />
 			<attribute name="Variables" />
 			<attribute name="Variables" />
@@ -573,20 +545,6 @@
 				<attribute name="Cast Shadows" value="true" />
 				<attribute name="Cast Shadows" value="true" />
 			</component>
 			</component>
 		</node>
 		</node>
-		<node id="134">
-			<attribute name="Is Enabled" value="true" />
-			<attribute name="Name" value="Box" />
-			<attribute name="Tags" />
-			<attribute name="Position" value="4.66537 1.35842 -9.11643" />
-			<attribute name="Rotation" value="-2.98023e-08 0 1 0" />
-			<attribute name="Scale" value="3 3 1" />
-			<attribute name="Variables" />
-			<component type="StaticModel" id="152">
-				<attribute name="Model" value="Model;Models/Box.mdl" />
-				<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
-				<attribute name="Cast Shadows" value="true" />
-			</component>
-		</node>
 		<node id="135">
 		<node id="135">
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Name" value="Box" />
 			<attribute name="Name" value="Box" />
@@ -629,20 +587,6 @@
 				<attribute name="Cast Shadows" value="true" />
 				<attribute name="Cast Shadows" value="true" />
 			</component>
 			</component>
 		</node>
 		</node>
-		<node id="193">
-			<attribute name="Is Enabled" value="true" />
-			<attribute name="Name" value="Box" />
-			<attribute name="Tags" />
-			<attribute name="Position" value="4.59633 1.35842 -22.1142" />
-			<attribute name="Rotation" value="-2.98023e-08 0 1 0" />
-			<attribute name="Scale" value="3 3 1" />
-			<attribute name="Variables" />
-			<component type="StaticModel" id="212">
-				<attribute name="Model" value="Model;Models/Box.mdl" />
-				<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
-				<attribute name="Cast Shadows" value="true" />
-			</component>
-		</node>
 		<node id="194">
 		<node id="194">
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Is Enabled" value="true" />
 			<attribute name="Name" value="Box" />
 			<attribute name="Name" value="Box" />
@@ -925,7 +869,7 @@
 				<attribute name="Font" value="Font;Fonts/BlueHighway.ttf" />
 				<attribute name="Font" value="Font;Fonts/BlueHighway.ttf" />
 				<attribute name="Font Size" value="15" />
 				<attribute name="Font Size" value="15" />
 				<attribute name="Text" value="Low Roughness" />
 				<attribute name="Text" value="Low Roughness" />
-				<attribute name="Width" value="134" />
+				<attribute name="Width" value="135" />
 			</component>
 			</component>
 		</node>
 		</node>
 		<node id="138">
 		<node id="138">
@@ -970,7 +914,7 @@
 				<attribute name="Font" value="Font;Fonts/BlueHighway.ttf" />
 				<attribute name="Font" value="Font;Fonts/BlueHighway.ttf" />
 				<attribute name="Font Size" value="15" />
 				<attribute name="Font Size" value="15" />
 				<attribute name="Text" value="High Roughness" />
 				<attribute name="Text" value="High Roughness" />
-				<attribute name="Width" value="136" />
+				<attribute name="Width" value="137" />
 			</component>
 			</component>
 		</node>
 		</node>
 		<node id="195">
 		<node id="195">
@@ -1190,7 +1134,8 @@
 				<attribute name="Variables" />
 				<attribute name="Variables" />
 				<component type="Light" id="4">
 				<component type="Light" id="4">
 					<attribute name="Light Type" value="Directional" />
 					<attribute name="Light Type" value="Directional" />
-					<attribute name="Brightness Multiplier" value="2" />
+					<attribute name="Brightness Multiplier" value="5000" />
+					<attribute name="Use Physical Values" value="true" />
 					<attribute name="Cast Shadows" value="true" />
 					<attribute name="Cast Shadows" value="true" />
 					<attribute name="CSM Splits" value="10 20 30 40" />
 					<attribute name="CSM Splits" value="10 20 30 40" />
 				</component>
 				</component>
@@ -1346,7 +1291,7 @@
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Name" value="Box" />
 		<attribute name="Name" value="Box" />
 		<attribute name="Tags" />
 		<attribute name="Tags" />
-		<attribute name="Position" value="2.66697 1.35842 -23.1164" />
+		<attribute name="Position" value="11.667 1.35842 -23.1164" />
 		<attribute name="Rotation" value="0.707107 0 0.707107 0" />
 		<attribute name="Rotation" value="0.707107 0 0.707107 0" />
 		<attribute name="Scale" value="3 3 1" />
 		<attribute name="Scale" value="3 3 1" />
 		<attribute name="Variables" />
 		<attribute name="Variables" />
@@ -1478,7 +1423,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="Light" id="224">
 		<component type="Light" id="224">
 			<attribute name="Specular Intensity" value="0" />
 			<attribute name="Specular Intensity" value="0" />
-			<attribute name="Brightness Multiplier" value="100" />
+			<attribute name="Brightness Multiplier" value="800" />
 			<attribute name="Use Physical Values" value="true" />
 			<attribute name="Use Physical Values" value="true" />
 			<attribute name="Range" value="7.97" />
 			<attribute name="Range" value="7.97" />
 			<attribute name="Spot FOV" value="62.08" />
 			<attribute name="Spot FOV" value="62.08" />
@@ -1582,7 +1527,7 @@
 			<attribute name="Font" value="Font;Fonts/BlueHighway.ttf" />
 			<attribute name="Font" value="Font;Fonts/BlueHighway.ttf" />
 			<attribute name="Font Size" value="15" />
 			<attribute name="Font Size" value="15" />
 			<attribute name="Text" value="Roughness Value    &lt;-1.0  -&gt;0.0" />
 			<attribute name="Text" value="Roughness Value    &lt;-1.0  -&gt;0.0" />
-			<attribute name="Width" value="262" />
+			<attribute name="Width" value="264" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="215">
 	<node id="215">
@@ -1832,11 +1777,11 @@
 		<attribute name="Scale" value="0.648644 0.648644 0.648644" />
 		<attribute name="Scale" value="0.648644 0.648644 0.648644" />
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="Light" id="251">
 		<component type="Light" id="251">
-			<attribute name="Brightness Multiplier" value="800" />
+			<attribute name="Brightness Multiplier" value="2100" />
 			<attribute name="Use Physical Values" value="true" />
 			<attribute name="Use Physical Values" value="true" />
-			<attribute name="Radius" value="0.11" />
-			<attribute name="Length" value="6.53" />
-			<attribute name="Range" value="7.61" />
+			<attribute name="Radius" value="22.79" />
+			<attribute name="Length" value="55.25" />
+			<attribute name="Range" value="9.17" />
 			<attribute name="Spot FOV" value="62.08" />
 			<attribute name="Spot FOV" value="62.08" />
 			<attribute name="Light Shape Texture" value="TextureCube;" />
 			<attribute name="Light Shape Texture" value="TextureCube;" />
 			<attribute name="Cast Shadows" value="true" />
 			<attribute name="Cast Shadows" value="true" />
@@ -2148,7 +2093,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="275">
 		<component type="StaticModel" id="275">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="256">
 	<node id="256">
@@ -2161,7 +2106,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="276">
 		<component type="StaticModel" id="276">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="257">
 	<node id="257">
@@ -2174,7 +2119,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="277">
 		<component type="StaticModel" id="277">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="258">
 	<node id="258">
@@ -2187,7 +2132,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="278">
 		<component type="StaticModel" id="278">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="259">
 	<node id="259">
@@ -2200,7 +2145,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="279">
 		<component type="StaticModel" id="279">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="260">
 	<node id="260">
@@ -2216,34 +2161,6 @@
 			<attribute name="Material" value="Material;Materials/PBR/Metallic10.xml" />
 			<attribute name="Material" value="Material;Materials/PBR/Metallic10.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
-	<node id="261">
-		<attribute name="Is Enabled" value="true" />
-		<attribute name="Name" value="Box" />
-		<attribute name="Tags" />
-		<attribute name="Position" value="7.66537 1.35842 -9.11643" />
-		<attribute name="Rotation" value="-2.98023e-08 0 1 0" />
-		<attribute name="Scale" value="3 3 1" />
-		<attribute name="Variables" />
-		<component type="StaticModel" id="281">
-			<attribute name="Model" value="Model;Models/Box.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
-			<attribute name="Cast Shadows" value="true" />
-		</component>
-	</node>
-	<node id="262">
-		<attribute name="Is Enabled" value="true" />
-		<attribute name="Name" value="Box" />
-		<attribute name="Tags" />
-		<attribute name="Position" value="7.59633 1.35842 -22.1142" />
-		<attribute name="Rotation" value="-2.98023e-08 0 1 0" />
-		<attribute name="Scale" value="3 3 1" />
-		<attribute name="Variables" />
-		<component type="StaticModel" id="282">
-			<attribute name="Model" value="Model;Models/Box.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
-			<attribute name="Cast Shadows" value="true" />
-		</component>
-	</node>
 	<node id="263">
 	<node id="263">
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Name" value="Box" />
 		<attribute name="Name" value="Box" />
@@ -2764,7 +2681,7 @@
 			<attribute name="Font" value="Font;Fonts/BlueHighway.ttf" />
 			<attribute name="Font" value="Font;Fonts/BlueHighway.ttf" />
 			<attribute name="Font Size" value="15" />
 			<attribute name="Font Size" value="15" />
 			<attribute name="Text" value="Metallic Value    &lt;-0.0  -&gt;1.0" />
 			<attribute name="Text" value="Metallic Value    &lt;-0.0  -&gt;1.0" />
-			<attribute name="Width" value="236" />
+			<attribute name="Width" value="237" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="307">
 	<node id="307">
@@ -2777,7 +2694,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="327">
 		<component type="StaticModel" id="327">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="308">
 	<node id="308">
@@ -2790,7 +2707,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="328">
 		<component type="StaticModel" id="328">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="309">
 	<node id="309">
@@ -2803,7 +2720,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="329">
 		<component type="StaticModel" id="329">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="310">
 	<node id="310">
@@ -2848,20 +2765,6 @@
 			<attribute name="Cast Shadows" value="true" />
 			<attribute name="Cast Shadows" value="true" />
 		</component>
 		</component>
 	</node>
 	</node>
-	<node id="313">
-		<attribute name="Is Enabled" value="true" />
-		<attribute name="Name" value="Box" />
-		<attribute name="Tags" />
-		<attribute name="Position" value="10.5963 1.35842 -7.11416" />
-		<attribute name="Rotation" value="-2.98023e-08 0 1 0" />
-		<attribute name="Scale" value="3 3 1" />
-		<attribute name="Variables" />
-		<component type="StaticModel" id="333">
-			<attribute name="Model" value="Model;Models/Box.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
-			<attribute name="Cast Shadows" value="true" />
-		</component>
-	</node>
 	<node id="314">
 	<node id="314">
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Name" value="Plane" />
 		<attribute name="Name" value="Plane" />
@@ -2872,7 +2775,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="334">
 		<component type="StaticModel" id="334">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="315">
 	<node id="315">
@@ -2885,7 +2788,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="335">
 		<component type="StaticModel" id="335">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="316">
 	<node id="316">
@@ -2898,7 +2801,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="336">
 		<component type="StaticModel" id="336">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="317">
 	<node id="317">
@@ -2911,7 +2814,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="337">
 		<component type="StaticModel" id="337">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="318">
 	<node id="318">
@@ -2924,7 +2827,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="338">
 		<component type="StaticModel" id="338">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="319">
 	<node id="319">
@@ -2937,7 +2840,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="339">
 		<component type="StaticModel" id="339">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="320">
 	<node id="320">
@@ -3010,20 +2913,6 @@
 			<attribute name="Cast Shadows" value="true" />
 			<attribute name="Cast Shadows" value="true" />
 		</component>
 		</component>
 	</node>
 	</node>
-	<node id="325">
-		<attribute name="Is Enabled" value="true" />
-		<attribute name="Name" value="Box" />
-		<attribute name="Tags" />
-		<attribute name="Position" value="4.59633 1.35842 -7.11416" />
-		<attribute name="Rotation" value="-2.98023e-08 0 1 0" />
-		<attribute name="Scale" value="3 3 1" />
-		<attribute name="Variables" />
-		<component type="StaticModel" id="345">
-			<attribute name="Model" value="Model;Models/Box.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
-			<attribute name="Cast Shadows" value="true" />
-		</component>
-	</node>
 	<node id="326">
 	<node id="326">
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Name" value="Box" />
 		<attribute name="Name" value="Box" />
@@ -3190,7 +3079,7 @@
 			<attribute name="Font" value="Font;Fonts/BlueHighway.ttf" />
 			<attribute name="Font" value="Font;Fonts/BlueHighway.ttf" />
 			<attribute name="Font Size" value="15" />
 			<attribute name="Font Size" value="15" />
 			<attribute name="Text" value="Sphere Lighting" />
 			<attribute name="Text" value="Sphere Lighting" />
-			<attribute name="Width" value="135" />
+			<attribute name="Width" value="134" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="338">
 	<node id="338">
@@ -3329,7 +3218,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="367">
 		<component type="StaticModel" id="367">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="348">
 	<node id="348">
@@ -3342,7 +3231,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="368">
 		<component type="StaticModel" id="368">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="349">
 	<node id="349">
@@ -3355,7 +3244,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="369">
 		<component type="StaticModel" id="369">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="350">
 	<node id="350">
@@ -3368,7 +3257,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="370">
 		<component type="StaticModel" id="370">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="351">
 	<node id="351">
@@ -3381,7 +3270,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="371">
 		<component type="StaticModel" id="371">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="352">
 	<node id="352">
@@ -3394,7 +3283,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="372">
 		<component type="StaticModel" id="372">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="353">
 	<node id="353">
@@ -3411,20 +3300,6 @@
 			<attribute name="Cast Shadows" value="true" />
 			<attribute name="Cast Shadows" value="true" />
 		</component>
 		</component>
 	</node>
 	</node>
-	<node id="354">
-		<attribute name="Is Enabled" value="true" />
-		<attribute name="Name" value="Box" />
-		<attribute name="Tags" />
-		<attribute name="Position" value="7.59633 1.35842 -7.11416" />
-		<attribute name="Rotation" value="-2.98023e-08 0 1 0" />
-		<attribute name="Scale" value="3 3 1" />
-		<attribute name="Variables" />
-		<component type="StaticModel" id="374">
-			<attribute name="Model" value="Model;Models/Box.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
-			<attribute name="Cast Shadows" value="true" />
-		</component>
-	</node>
 	<node id="355">
 	<node id="355">
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Name" value="Box" />
 		<attribute name="Name" value="Box" />
@@ -3709,7 +3584,7 @@
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Name" value="Box" />
 		<attribute name="Name" value="Box" />
 		<attribute name="Tags" />
 		<attribute name="Tags" />
-		<attribute name="Position" value="1.16697 1.83612 -13.9362" />
+		<attribute name="Position" value="10.667 1.83612 -13.9362" />
 		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
 		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
 		<attribute name="Scale" value="3 3 1" />
 		<attribute name="Scale" value="3 3 1" />
 		<attribute name="Variables" />
 		<attribute name="Variables" />
@@ -3751,7 +3626,7 @@
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Name" value="Box" />
 		<attribute name="Name" value="Box" />
 		<attribute name="Tags" />
 		<attribute name="Tags" />
-		<attribute name="Position" value="1.16697 1.83612 -16.9362" />
+		<attribute name="Position" value="10.667 1.83612 -16.9362" />
 		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
 		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
 		<attribute name="Scale" value="3 3 1" />
 		<attribute name="Scale" value="3 3 1" />
 		<attribute name="Variables" />
 		<attribute name="Variables" />
@@ -3835,7 +3710,7 @@
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Name" value="Box" />
 		<attribute name="Name" value="Box" />
 		<attribute name="Tags" />
 		<attribute name="Tags" />
-		<attribute name="Position" value="2.66697 1.35842 -8.11643" />
+		<attribute name="Position" value="11.667 1.35842 -8.11643" />
 		<attribute name="Rotation" value="0.707107 0 0.707107 0" />
 		<attribute name="Rotation" value="0.707107 0 0.707107 0" />
 		<attribute name="Scale" value="3 3 1" />
 		<attribute name="Scale" value="3 3 1" />
 		<attribute name="Variables" />
 		<attribute name="Variables" />
@@ -3942,7 +3817,7 @@
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Name" value="Plane" />
 		<attribute name="Name" value="Plane" />
 		<attribute name="Tags" />
 		<attribute name="Tags" />
-		<attribute name="Position" value="0.66697 2.35842 -7.11643" />
+		<attribute name="Position" value="10.167 2.35842 -23.1164" />
 		<attribute name="Rotation" value="1 0 0 0" />
 		<attribute name="Rotation" value="1 0 0 0" />
 		<attribute name="Scale" value="3 1 3" />
 		<attribute name="Scale" value="3 1 3" />
 		<attribute name="Variables" />
 		<attribute name="Variables" />
@@ -3994,15 +3869,15 @@
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Name" value="" />
 		<attribute name="Name" value="" />
 		<attribute name="Tags" />
 		<attribute name="Tags" />
-		<attribute name="Position" value="6.54564 5.37075 -0.065205" />
+		<attribute name="Position" value="6.27316 5.37075 -0.609303" />
 		<attribute name="Rotation" value="1 0 0 0" />
 		<attribute name="Rotation" value="1 0 0 0" />
 		<attribute name="Scale" value="0.648644 0.648644 0.648644" />
 		<attribute name="Scale" value="0.648644 0.648644 0.648644" />
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="Light" id="416">
 		<component type="Light" id="416">
-			<attribute name="Brightness Multiplier" value="800" />
+			<attribute name="Brightness Multiplier" value="2100" />
 			<attribute name="Use Physical Values" value="true" />
 			<attribute name="Use Physical Values" value="true" />
-			<attribute name="Radius" value="0.61" />
-			<attribute name="Range" value="7.61" />
+			<attribute name="Radius" value="25.6" />
+			<attribute name="Range" value="11.09" />
 			<attribute name="Spot FOV" value="62.08" />
 			<attribute name="Spot FOV" value="62.08" />
 			<attribute name="Light Shape Texture" value="TextureCube;" />
 			<attribute name="Light Shape Texture" value="TextureCube;" />
 			<attribute name="Cast Shadows" value="true" />
 			<attribute name="Cast Shadows" value="true" />
@@ -4046,7 +3921,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="Light" id="419">
 		<component type="Light" id="419">
 			<attribute name="Specular Intensity" value="0" />
 			<attribute name="Specular Intensity" value="0" />
-			<attribute name="Brightness Multiplier" value="100" />
+			<attribute name="Brightness Multiplier" value="800" />
 			<attribute name="Use Physical Values" value="true" />
 			<attribute name="Use Physical Values" value="true" />
 			<attribute name="Range" value="11.15" />
 			<attribute name="Range" value="11.15" />
 			<attribute name="Spot FOV" value="62.08" />
 			<attribute name="Spot FOV" value="62.08" />
@@ -4082,7 +3957,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="422">
 		<component type="StaticModel" id="422">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="403">
 	<node id="403">
@@ -4095,7 +3970,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="423">
 		<component type="StaticModel" id="423">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="404">
 	<node id="404">
@@ -4108,7 +3983,7 @@
 		<attribute name="Variables" />
 		<attribute name="Variables" />
 		<component type="StaticModel" id="424">
 		<component type="StaticModel" id="424">
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
 			<attribute name="Model" value="Model;Models/Plane.mdl" />
-			<attribute name="Material" value="Material;Materials/PBR/Sand.xml" />
+			<attribute name="Material" value="Material;Materials/PBR/Mud.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
 	<node id="405">
 	<node id="405">
@@ -4150,4 +4025,796 @@
 			<attribute name="Material" value="Material;Materials/PBR/Metallic10.xml" />
 			<attribute name="Material" value="Material;Materials/PBR/Metallic10.xml" />
 		</component>
 		</component>
 	</node>
 	</node>
+	<node id="408">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="10.667 1.83612 -19.9362" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="428">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="409">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="-4.33303 1.83612 -19.9362" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="429">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="410">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="-1.33303 1.83612 -19.9362" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="430">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="411">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="1.16697 1.83612 3.88357" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="431">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="412">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="1.16697 1.83612 -22.9362" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="432">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="413">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="1.16697 1.83612 0.88357" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="433">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="414">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="1.16697 1.83612 -11.1164" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="434">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="415">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="1.16697 1.83612 -8.11643" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="435">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="416">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="1.16697 1.83612 -5.11643" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="436">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="417">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="1.16697 1.83612 -2.11643" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="437">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="418">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="1.16697 1.83612 -13.9362" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="438">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="419">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="1.16697 1.83612 -16.9362" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="439">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="420">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="1.16697 1.83612 -19.9362" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="440">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="421">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="4.66697 1.83612 3.88357" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="441">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="422">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="4.66697 1.83612 -22.9362" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="442">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="423">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="4.66697 1.83612 0.88357" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="443">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="424">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="4.66697 1.83612 -11.1164" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="444">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="425">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="4.66697 1.83612 -8.11643" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="445">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="426">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="4.66697 1.83612 -5.11643" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="446">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="427">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="4.66697 1.83612 -2.11643" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="447">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="428">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="4.66697 1.83612 -13.9362" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="448">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="429">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="4.66697 1.83612 -16.9362" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="449">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="430">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="4.66697 1.83612 -19.9362" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="450">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="431">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="7.66697 1.83612 3.88357" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="451">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="432">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="7.66697 1.83612 -22.9362" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="452">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="433">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="7.66697 1.83612 0.88357" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="453">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="434">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="7.66697 1.83612 -11.1164" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="454">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="435">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="7.66697 1.83612 -8.11643" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="455">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="436">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="7.66697 1.83612 -5.11643" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="456">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="437">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="7.66697 1.83612 -2.11643" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="457">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="438">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="7.66697 1.83612 -13.9362" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="458">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="439">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="7.66697 1.83612 -16.9362" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="459">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="440">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="7.66697 1.83612 -19.9362" />
+		<attribute name="Rotation" value="2.68221e-07 -2.68221e-07 0.707107 0.707107" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="460">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="441">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Plane" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="0.66697 2.35842 -7.11643" />
+		<attribute name="Rotation" value="1 0 0 0" />
+		<attribute name="Scale" value="3 1 3" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="461">
+			<attribute name="Model" value="Model;Models/Plane.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Roughness3.xml" />
+		</component>
+	</node>
+	<node id="442">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Plane" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="4.16697 2.35842 -23.1164" />
+		<attribute name="Rotation" value="1 0 0 0" />
+		<attribute name="Scale" value="3 1 3" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="462">
+			<attribute name="Model" value="Model;Models/Plane.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Roughness3.xml" />
+		</component>
+	</node>
+	<node id="443">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Plane" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="7.16697 2.35842 -23.1164" />
+		<attribute name="Rotation" value="1 0 0 0" />
+		<attribute name="Scale" value="3 1 3" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="463">
+			<attribute name="Model" value="Model;Models/Plane.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Roughness3.xml" />
+		</component>
+	</node>
+	<node id="444">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Plane" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="10.167 2.35842 -8.11643" />
+		<attribute name="Rotation" value="1 0 0 0" />
+		<attribute name="Scale" value="3 1 3" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="464">
+			<attribute name="Model" value="Model;Models/Plane.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Roughness3.xml" />
+		</component>
+	</node>
+	<node id="445">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Plane" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="4.16697 2.35842 -8.11643" />
+		<attribute name="Rotation" value="1 0 0 0" />
+		<attribute name="Scale" value="3 1 3" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="465">
+			<attribute name="Model" value="Model;Models/Plane.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Roughness3.xml" />
+		</component>
+	</node>
+	<node id="446">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Plane" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="7.16697 2.35842 -8.11643" />
+		<attribute name="Rotation" value="1 0 0 0" />
+		<attribute name="Scale" value="3 1 3" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="466">
+			<attribute name="Model" value="Model;Models/Plane.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Roughness3.xml" />
+		</component>
+	</node>
+	<node id="447">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="2.66697 1.35842 -23.1164" />
+		<attribute name="Rotation" value="0.707107 0 0.707107 0" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="467">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="448">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="3.66697 1.35842 -23.1164" />
+		<attribute name="Rotation" value="0.707107 0 0.707107 0" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="468">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="449">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="4.66697 1.35842 -23.1164" />
+		<attribute name="Rotation" value="0.707107 0 0.707107 0" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="469">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="450">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="5.66697 1.35842 -23.1164" />
+		<attribute name="Rotation" value="0.707107 0 0.707107 0" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="470">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="451">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="6.66697 1.35842 -23.1164" />
+		<attribute name="Rotation" value="0.707107 0 0.707107 0" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="471">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="452">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="7.66697 1.35842 -23.1164" />
+		<attribute name="Rotation" value="0.707107 0 0.707107 0" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="472">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="453">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="8.66697 1.35842 -23.1164" />
+		<attribute name="Rotation" value="0.707107 0 0.707107 0" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="473">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="454">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="9.66697 1.35842 -23.1164" />
+		<attribute name="Rotation" value="0.707107 0 0.707107 0" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="474">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="455">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="10.667 1.35842 -23.1164" />
+		<attribute name="Rotation" value="0.707107 0 0.707107 0" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="475">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="456">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="2.66697 1.35842 -8.11643" />
+		<attribute name="Rotation" value="0.707107 0 0.707107 0" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="476">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="457">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="3.66697 1.35842 -8.11643" />
+		<attribute name="Rotation" value="0.707107 0 0.707107 0" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="477">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="458">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="4.66697 1.35842 -8.11643" />
+		<attribute name="Rotation" value="0.707107 0 0.707107 0" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="478">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="459">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="5.66697 1.35842 -8.11643" />
+		<attribute name="Rotation" value="0.707107 0 0.707107 0" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="479">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="460">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="6.66697 1.35842 -8.11643" />
+		<attribute name="Rotation" value="0.707107 0 0.707107 0" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="480">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="461">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="7.66697 1.35842 -8.11643" />
+		<attribute name="Rotation" value="0.707107 0 0.707107 0" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="481">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="462">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="8.66697 1.35842 -8.11643" />
+		<attribute name="Rotation" value="0.707107 0 0.707107 0" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="482">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="463">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="9.66697 1.35842 -8.11643" />
+		<attribute name="Rotation" value="0.707107 0 0.707107 0" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="483">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
+	<node id="464">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Box" />
+		<attribute name="Tags" />
+		<attribute name="Position" value="10.667 1.35842 -8.11643" />
+		<attribute name="Rotation" value="0.707107 0 0.707107 0" />
+		<attribute name="Scale" value="3 3 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="484">
+			<attribute name="Model" value="Model;Models/Box.mdl" />
+			<attribute name="Material" value="Material;Materials/PBR/Tile.xml" />
+			<attribute name="Cast Shadows" value="true" />
+		</component>
+	</node>
 </scene>
 </scene>

+ 2 - 0
bin/Data/Scripts/42_PBRMaterials.as

@@ -160,6 +160,8 @@ void SetupViewport()
     RenderPath@ effectRenderPath = viewport.renderPath.Clone();
     RenderPath@ effectRenderPath = viewport.renderPath.Clone();
     effectRenderPath.Append(cache.GetResource("XMLFile", "PostProcess/FXAA2.xml"));
     effectRenderPath.Append(cache.GetResource("XMLFile", "PostProcess/FXAA2.xml"));
     effectRenderPath.Append(cache.GetResource("XMLFile", "PostProcess/GammaCorrection.xml"));
     effectRenderPath.Append(cache.GetResource("XMLFile", "PostProcess/GammaCorrection.xml"));
+    effectRenderPath.Append(cache.GetResource("XMLFile", "PostProcess/Tonemap.xml"));
+    effectRenderPath.Append(cache.GetResource("XMLFile", "PostProcess/AutoExposure.xml"));
 
 
     viewport.renderPath = effectRenderPath;
     viewport.renderPath = effectRenderPath;
 }
 }