Quellcode durchsuchen

More shaders ported the new system

BearishSun vor 8 Jahren
Ursprung
Commit
046b0c02a9
31 geänderte Dateien mit 658 neuen und 774 gelöschten Zeilen
  1. 19 36
      Data/Raw/Editor/Includes/LineGizmo.bslinc
  2. 39 60
      Data/Raw/Editor/Includes/PickingAlphaCull.bslinc
  3. 28 46
      Data/Raw/Editor/Includes/PickingCull.bslinc
  4. 35 34
      Data/Raw/Editor/Includes/SelectionBase.bslinc
  5. 25 45
      Data/Raw/Editor/Includes/SolidGizmo.bslinc
  6. 29 26
      Data/Raw/Editor/Shaders/ClearHandleAlpha.bsl
  7. 36 46
      Data/Raw/Editor/Shaders/DockDropOverlay.bsl
  8. 22 36
      Data/Raw/Editor/Shaders/GizmoPicking.bsl
  9. 35 55
      Data/Raw/Editor/Shaders/GizmoPickingAlpha.bsl
  10. 33 41
      Data/Raw/Editor/Shaders/IconGizmo.bsl
  11. 13 8
      Data/Raw/Editor/Shaders/LineGizmo.bsl
  12. 24 11
      Data/Raw/Editor/Shaders/LineHandle.bsl
  13. 5 3
      Data/Raw/Editor/Shaders/PickingAlphaCullCCW.bsl
  14. 5 3
      Data/Raw/Editor/Shaders/PickingAlphaCullCW.bsl
  15. 5 3
      Data/Raw/Editor/Shaders/PickingAlphaCullNone.bsl
  16. 5 3
      Data/Raw/Editor/Shaders/PickingCullCCW.bsl
  17. 5 3
      Data/Raw/Editor/Shaders/PickingCullCW.bsl
  18. 5 3
      Data/Raw/Editor/Shaders/PickingCullNone.bsl
  19. 64 69
      Data/Raw/Editor/Shaders/SceneGrid.bsl
  20. 13 9
      Data/Raw/Editor/Shaders/Selection.bsl
  21. 4 2
      Data/Raw/Editor/Shaders/SolidGizmo.bsl
  22. 24 11
      Data/Raw/Editor/Shaders/SolidHandle.bsl
  23. 39 53
      Data/Raw/Editor/Shaders/TextGizmo.bsl
  24. 23 37
      Data/Raw/Editor/Shaders/WireGizmo.bsl
  25. 76 79
      Data/Raw/Engine/Includes/ShadowDepthBase.bslinc
  26. 44 47
      Data/Raw/Engine/Shaders/ShadowDepthCube.bsl
  27. 1 1
      Data/Raw/Engine/Shaders/ShadowDepthNormal.bsl
  28. 0 1
      Source/BansheeSL/BsLexerFX.l
  29. 0 1
      Source/BansheeSL/BsParserFX.y
  30. 1 1
      Source/BansheeUtility/Source/BsDataStream.cpp
  31. 1 1
      Source/BansheeUtility/Source/BsTextureAtlasLayout.cpp

+ 19 - 36
Data/Raw/Editor/Includes/LineGizmo.bslinc

@@ -1,43 +1,26 @@
-Parameters =
+mixin LineGizmoBase
 {
-	mat4x4		gMatViewProj;
-	float4		gViewDir;
-};
-
-Blocks =
-{
-	Block Uniforms : auto("GizmoUniforms");
-};
-
-Technique : base("LineGizmo") =
-{
-	Pass =
+	code
 	{
-		Vertex =
+		cbuffer Uniforms
+		{
+			float4x4 	gMatViewProj;
+			float4		gViewDir;
+		}
+
+		void vsmain(
+			in float3 inPos : POSITION,
+			in float4 color : COLOR0,
+			out float4 oPosition : SV_Position,
+			out float4 oColor : COLOR0)
 		{
-			cbuffer Uniforms
-			{
-				float4x4 	gMatViewProj;
-				float4		gViewDir;
-			}
+			oPosition = mul(gMatViewProj, float4(inPos.xyz, 1));
+			oColor = color;
+		}
 
-			void main(
-				in float3 inPos : POSITION,
-				in float4 color : COLOR0,
-				out float4 oPosition : SV_Position,
-				out float4 oColor : COLOR0)
-			{
-				oPosition = mul(gMatViewProj, float4(inPos.xyz, 1));
-				oColor = color;
-			}
-		};
-		
-		Fragment =
+		float4 fsmain(in float4 inPos : SV_Position, in float4 color : COLOR0) : SV_Target
 		{
-			float4 main(in float4 inPos : SV_Position, in float4 color : COLOR0) : SV_Target
-			{
-				return color;
-			}
-		};
+			return color;
+		}
 	};
 };

+ 39 - 60
Data/Raw/Editor/Includes/PickingAlphaCull.bslinc

@@ -1,68 +1,47 @@
-Parameters =
+mixin PickingAlphaCull
 {
-	mat4x4		gMatWorldViewProj;
-	color		gColorIndex;
-	float		gAlphaCutoff;
-	
-	Sampler2D 	gMainTexSamp : alias("gMainTexture");
-	Texture2D 	gMainTexture;	
-};
-
-Blocks =
-{
-	Block Uniforms : auto("PickingUniforms");
-};
-
-Technique : base("PickingAlphaCull") =
-{
-	Pass =
+	raster
 	{
-		Scissor = true;
+		scissor = true;
+	};
 
-		Common =
-		{
-			cbuffer Uniforms
-			{
-				float4x4 	gMatWorldViewProj;
-				float4		gColorIndex;
-				float		gAlphaCutoff;
-			}
-		};			
-		
-		Vertex =
+	code
+	{
+		cbuffer Uniforms
 		{
-			void main(
-				in float3 inPos : POSITION,
-				in float3 inNorm : NORMAL,
-				in float2 uv : TEXCOORD0,
-				out float4 oPosition : SV_Position,
-				out float4 oNorm : NORMAL,
-				out float2 oUv : TEXCOORD0)
-			{
-				oPosition = mul(gMatWorldViewProj, float4(inPos.xyz, 1));
-				oNorm = float4(inNorm, 0);
-				oUv = uv;
-			}
-		};
-		
-		Fragment =
+			float4x4 	gMatWorldViewProj;
+			float4		gColorIndex;
+			float		gAlphaCutoff;
+		}
+
+		void vsmain(
+			in float3 inPos : POSITION,
+			in float3 inNorm : NORMAL,
+			in float2 uv : TEXCOORD0,
+			out float4 oPosition : SV_Position,
+			out float4 oNorm : NORMAL,
+			out float2 oUv : TEXCOORD0)
 		{
-			SamplerState gMainTexSamp : register(s0);
-			Texture2D gMainTexture : register(t0);
+			oPosition = mul(gMatWorldViewProj, float4(inPos.xyz, 1));
+			oNorm = float4(inNorm, 0);
+			oUv = uv;
+		}
 
-			float4 main(
-				in float4 inPos : SV_Position,
-				in float4 inNorm : NORMAL,
-				in float2 uv : TEXCOORD0,
-				out float4 oNorm : SV_Target1) : SV_Target0
-			{
-				float4 color = gMainTexture.Sample(gMainTexSamp, uv);
-				oNorm = (inNorm + float4(1,1,1,0)) / 2;
-				if(color.a < gAlphaCutoff)
-					discard;
-				
-				return gColorIndex;
-			}
-		};
+		SamplerState gMainTexSamp;
+		Texture2D gMainTexture;
+
+		float4 fsmain(
+			in float4 inPos : SV_Position,
+			in float4 inNorm : NORMAL,
+			in float2 uv : TEXCOORD0,
+			out float4 oNorm : SV_Target1) : SV_Target0
+		{
+			float4 color = gMainTexture.Sample(gMainTexSamp, uv);
+			oNorm = (inNorm + float4(1,1,1,0)) / 2;
+			if(color.a < gAlphaCutoff)
+				discard;
+			
+			return gColorIndex;
+		}
 	};
 };

+ 28 - 46
Data/Raw/Editor/Includes/PickingCull.bslinc

@@ -1,55 +1,37 @@
-Parameters =
+mixin PickingCull
 {
-	mat4x4		gMatWorldViewProj;
-	color		gColorIndex;
-	float		gAlphaCutoff;
-};
-
-Blocks =
-{
-	Block Uniforms : auto("PickingUniforms");
-};
+	raster
+	{
+		scissor = true;
+	};
 
-Technique : base("PickingCull") =
-{
-	Pass =
+	code
 	{
-		Scissor = true;
-		
-		Common =
+		cbuffer Uniforms
 		{
-			cbuffer Uniforms
-			{
-				float4x4 	gMatWorldViewProj;
-				float4		gColorIndex;
-				float		gAlphaCutoff;
-			}
-		};		
+			float4x4 	gMatWorldViewProj;
+			float4		gColorIndex;
+			float		gAlphaCutoff;
+		}
 
-		Vertex =
+		void vsmain(
+			in float3 inPos : POSITION,
+			in float3 inNorm : NORMAL,
+			out float4 oPosition : SV_Position,
+			out float4 oNorm : NORMAL)
 		{
-			void main(
-				in float3 inPos : POSITION,
-				in float3 inNorm : NORMAL,
-				out float4 oPosition : SV_Position,
-				out float4 oNorm : NORMAL)
-			{
-				oPosition = mul(gMatWorldViewProj, float4(inPos.xyz, 1));
-				oNorm = float4(inNorm, 0);
-			}
-		};
-		
-		Fragment =
+			oPosition = mul(gMatWorldViewProj, float4(inPos.xyz, 1));
+			oNorm = float4(inNorm, 0);
+		}
+
+		float4 fsmain(
+			in float4 inPos : SV_Position,
+			in float4 inNorm : NORMAL,	
+			out float4 oNorm : SV_Target1
+		) : SV_Target0
 		{
-			float4 main(
-				in float4 inPos : SV_Position,
-				in float4 inNorm : NORMAL,	
-				out float4 oNorm : SV_Target1
-			) : SV_Target0
-			{
-				oNorm = (inNorm + float4(1,1,1,0)) / 2;
-				return gColorIndex;
-			}
-		};
+			oNorm = (inNorm + float4(1,1,1,0)) / 2;
+			return gColorIndex;
+		}
 	};
 };

+ 35 - 34
Data/Raw/Editor/Includes/SelectionBase.bslinc

@@ -1,55 +1,56 @@
-Parameters =
+mixin SelectionBase
 {
-	mat4x4			matWorldViewProj;
-	float4			selColor;
-	StructBuffer 	boneMatrices;
-};
-
-Technique : base("SelectionBase") =
-{
-	Pass =
+	raster
 	{
-		Fill = WIRE;
-		DepthBias = 0.00001f;
-		
-		Target =
+		fill = wire;
+	};
+	
+	depth
+	{
+		bias = 0.00001f;
+	};
+	
+	blend
+	{
+		target
 		{
-			Blend = true;
-			Color = { SRCA, SRCIA, ADD };
+			enabled = true;
+			color = { srcA, srcIA, add };
+		};
+	};
+	
+	code
+	{
+		cbuffer FragParams
+		{	
+			float4 selColor;
 		};
 
-		Fragment =
+		float4 fsmain(in float4 inPos : SV_Position) : SV_Target
 		{
-			cbuffer FragParams
-			{	
-				float4 selColor;
-			};
-
-			float4 main(in float4 inPos : SV_Position) : SV_Target
-			{
-				return selColor;
-			}
-		};
+			return selColor;
+		}
 	};
 };
 
-Technique 
+mixin 
 #ifdef USE_BLEND_SHAPES
 	#ifdef USE_SKELETON
-	 : base("SelectionSkinnedMorph")
+	 : SelectionSkinnedMorph
 	#else
-	 : base("SelectionMorph")
+	 : SelectionMorph
 	#endif
 #else
 	#ifdef USE_SKELETON
-	 : base("SelectionSkinned")
+	 : SelectionSkinned
 	#else
-	 : base("Selection")
+	 : Selection
 	#endif
 #endif
- : inherits("SelectionBase") = 
 {
-	Vertex =
+	mixin SelectionBase;
+
+	code
 	{
 		struct VertexInput
 		{
@@ -94,7 +95,7 @@ Technique
 		}			
 #endif
 		
-		void main(VertexInput input, out float4 oPosition : SV_Position)
+		void vsmain(VertexInput input, out float4 oPosition : SV_Position)
 		{
 #ifdef USE_BLEND_SHAPES
 			float4 position = float4(input.position + input.deltaPosition, 1.0f);

+ 25 - 45
Data/Raw/Editor/Includes/SolidGizmo.bslinc

@@ -1,52 +1,32 @@
-Parameters =
+mixin SolidGizmoBase
 {
-	mat4x4		gMatViewProj;
-	float4		gViewDir;
-};
-
-Blocks =
-{
-	Block Uniforms : auto("GizmoUniforms");
-};
-
-Technique : base("SolidGizmo") =
-{
-	Pass =
+	code
 	{
-		Common =
+		cbuffer Uniforms
 		{
-			cbuffer Uniforms
-			{
-				float4x4 	gMatViewProj;
-				float4		gViewDir;
-			}
-		};
-	
-		Vertex =
+			float4x4 	gMatViewProj;
+			float4		gViewDir;
+		}
+
+		void vsmain(
+			in float3 inPos : POSITION,
+			in float3 inNormal : NORMAL,
+			in float4 color : COLOR0,
+			out float4 oPosition : SV_Position,
+			out float3 oNormal : NORMAL,
+			out float4 oColor : COLOR0)
 		{
-			void main(
-				in float3 inPos : POSITION,
-				in float3 inNormal : NORMAL,
-				in float4 color : COLOR0,
-				out float4 oPosition : SV_Position,
-				out float3 oNormal : NORMAL,
-				out float4 oColor : COLOR0)
-			{
-				oPosition = mul(gMatViewProj, float4(inPos.xyz, 1));
-				oNormal = inNormal;
-				oColor = color;
-			}
-		};
-		
-		Fragment =
+			oPosition = mul(gMatViewProj, float4(inPos.xyz, 1));
+			oNormal = inNormal;
+			oColor = color;
+		}
+
+		float4 fsmain(in float4 inPos : SV_Position, in float3 normal : NORMAL, in float4 color : COLOR0) : SV_Target
 		{
-			float4 main(in float4 inPos : SV_Position, in float3 normal : NORMAL, in float4 color : COLOR0) : SV_Target
-			{
-				float4 outColor = color * dot(normalize(normal), -gViewDir);
-				outColor.a = color.a;
-				
-				return outColor;
-			}
-		};
+			float4 outColor = color * dot(normalize(normal), -gViewDir);
+			outColor.a = color.a;
+			
+			return outColor;
+		}
 	};
 };

+ 29 - 26
Data/Raw/Editor/Shaders/ClearHandleAlpha.bsl

@@ -1,33 +1,36 @@
-Technique =
+technique ClearHandleAlpha
 {
-	Pass =
+	blend
 	{
-		Target = 
+		target
 		{
-			WriteMask = A;
+			writemask = A;
 		};
-		
-		DepthRead = false;
-		DepthWrite = false;
-		
-		Stencil = true;
-		StencilOpFront = { KEEP, KEEP, KEEP, LTE };
-		StencilRef = 1;
-		
-		Vertex =
+	};
+	
+	depth
+	{
+		read = false;
+		write = false;
+	};
+	
+	stencil
+	{
+		enabled = true;
+		front = { keep, keep, keep, lte };
+		reference = 1;
+	};
+	
+	code
+	{
+		float4 vsmain(float2 screenPos : POSITION) : SV_POSITION
 		{
-			float4 main(float2 screenPos : POSITION) : SV_POSITION
-			{
-				return float4(screenPos, 0, 1);
-			}
-		};	
-		
-		Fragment = 
+			return float4(screenPos, 0, 1);
+		}
+
+		float4 fsmain(in float4 inPos : SV_Position) : SV_Target
 		{
-			float4 main(in float4 inPos : SV_Position) : SV_Target
-			{
-				return float4(0, 0, 0, 1);
-			}	
-		};	
-	};
+			return float4(0, 0, 0, 1);
+		}	
+	};	
 };

+ 36 - 46
Data/Raw/Editor/Shaders/DockDropOverlay.bsl

@@ -1,62 +1,52 @@
-Parameters =
+technique DockDropOverlay
 {
-	float	invViewportWidth;
-	float	invViewportHeight;
-	
-	color		tintColor;
-	color		highlightColor;
-	color		highlightActive;
-};
-
-Technique =
-{
-	Pass =
+	blend
 	{
-		Target = 
+		target
 		{
-			Blend = true;
-			Color = { SRCA, SRCIA, ADD };
+			enabled = true;
+			color = { srcA, srcIA, add };
 		};
-		
-		DepthRead = false;
-		DepthWrite = false;
-		
-		Vertex =
-		{
-			cbuffer Uniforms
-			{	
-				float invViewportWidth;
-				float invViewportHeight;
+	};
 
-				float4 tintColor;
-				float4 highlightColor;
-				float4 highlightActive;
-			};
+	depth
+	{
+		read = false;
+		write = false;
+	};
+	
+	code
+	{
+		cbuffer Uniforms
+		{	
+			float invViewportWidth;
+			float invViewportHeight;
+
+			float4 tintColor;
+			float4 highlightColor;
+			float4 highlightActive;
+		};
 
-			void main(
+		void vsmain(
 			in float2 inPos : POSITION,
 			in float4 color : COLOR0,
 			out float4 oPosition : SV_Position,
 			out float4 oColor : COLOR0)
-			{
-				float tfrmdX = -1.0f + (inPos.x * invViewportWidth);
-				float tfrmdY = 1.0f - (inPos.y * invViewportHeight);
+		{
+			float tfrmdX = -1.0f + (inPos.x * invViewportWidth);
+			float tfrmdY = 1.0f - (inPos.y * invViewportHeight);
 
-				oPosition = float4(tfrmdX, tfrmdY, 0, 1);
+			oPosition = float4(tfrmdX, tfrmdY, 0, 1);
 
-				float4 highlight = highlightActive * color;
-				float highlightSum = highlight.x + highlight.y + highlight.z + highlight.a;
+			float4 highlight = highlightActive * color;
+			float highlightSum = highlight.x + highlight.y + highlight.z + highlight.a;
 
-				oColor = (1.0f - highlightSum) * tintColor + highlightSum * highlightColor;
-			}
-		};
-		
-		Fragment =
+			oColor = (1.0f - highlightSum) * tintColor + highlightSum * highlightColor;
+		}
+
+		float4 fsmain(in float4 inPos : SV_Position, in float4 color : COLOR0) : SV_Target
 		{
-			float4 main(in float4 inPos : SV_Position, in float4 color : COLOR0) : SV_Target
-			{
-				return color;
-			}	
-		};
+			return color;
+		}	
 	};
 };

+ 22 - 36
Data/Raw/Editor/Shaders/GizmoPicking.bsl

@@ -1,45 +1,31 @@
-Parameters =
+technique GizmoPicking
 {
-	mat4x4		gMatViewProj;
-	float		gAlphaCutoff;
-};
-
-Blocks =
-{
-	Block Uniforms : auto("GizmoUniforms");
-};
+	raster
+	{
+		scissor = true;
+	};
 
-Technique =
-{
-	Pass =
+	code
 	{
-		Scissor = true;
+		cbuffer Uniforms
+		{
+			float4x4 	gMatViewProj;
+			float		gAlphaCutoff;
+		}
 
-		Vertex =
+		void vsmain(
+			in float3 inPos : POSITION,
+			in float4 inColor : COLOR0,
+			out float4 oPosition : SV_Position,
+			out float4 oColor : COLOR0)
 		{
-			cbuffer Uniforms
-			{
-				float4x4 	gMatViewProj;
-				float		gAlphaCutoff;
-			}
+			oPosition = mul(gMatViewProj, float4(inPos.xyz, 1));
+			oColor = inColor;
+		}
 
-			void main(
-				in float3 inPos : POSITION,
-				in float4 inColor : COLOR0,
-				out float4 oPosition : SV_Position,
-				out float4 oColor : COLOR0)
-			{
-				oPosition = mul(gMatViewProj, float4(inPos.xyz, 1));
-				oColor = inColor;
-			}
-		};
-		
-		Fragment =
+		float4 fsmain(in float4 inPos : SV_Position, in float4 inColor : COLOR0) : SV_Target
 		{
-			float4 main(in float4 inPos : SV_Position, in float4 inColor : COLOR0) : SV_Target
-			{
-				return inColor;
-			}
-		};
+			return inColor;
+		}
 	};
 };

+ 35 - 55
Data/Raw/Editor/Shaders/GizmoPickingAlpha.bsl

@@ -1,63 +1,43 @@
-Parameters =
+technique GizmoPickingAlpha
 {
-	mat4x4		gMatViewProj;
-	float		gAlphaCutoff;
+	raster
+	{
+		scissor = true;
+	};
 	
-	Sampler2D 	gMainTexSamp : alias("gMainTexture");
-	Texture2D 	gMainTexture;	
-};
-
-Blocks =
-{
-	Block Uniforms : auto("GizmoUniforms");
-};
-
-Technique =
-{
-	Pass =
+	code
 	{
-		Scissor = true;
-
-		Common =
-		{
-			cbuffer Uniforms
-			{
-				float4x4 	gMatViewProj;
-				float		gAlphaCutoff;
-			}
-		};		
-		
-		Vertex =
+		cbuffer Uniforms
 		{
-			void main(
-				in float3 inPos : POSITION,
-				in float2 uv : TEXCOORD0,
-				in float4 color : COLOR0,
-				out float4 oPosition : SV_Position,
-				out float2 oUv : TEXCOORD0,
-				out float4 oColor : COLOR0)
-			{
-				oPosition = mul(gMatViewProj, float4(inPos.xyz, 1));
-				oUv = uv;
-				oColor = color;
-			}
-		};
-		
-		Fragment =
+			float4x4 	gMatViewProj;
+			float		gAlphaCutoff;
+		}
+
+		void vsmain(
+			in float3 inPos : POSITION,
+			in float2 uv : TEXCOORD0,
+			in float4 color : COLOR0,
+			out float4 oPosition : SV_Position,
+			out float2 oUv : TEXCOORD0,
+			out float4 oColor : COLOR0)
 		{
-			SamplerState gMainTexSamp : register(s0);
-			Texture2D gMainTexture : register(t0);
+			oPosition = mul(gMatViewProj, float4(inPos.xyz, 1));
+			oUv = uv;
+			oColor = color;
+		}
 
-			float4 main(in float4 inPos : SV_Position, 
-						   in float2 uv : TEXCOORD0,
-						   in float4 inColor : COLOR0) : SV_Target
-			{
-				float4 color = gMainTexture.Sample(gMainTexSamp, uv);
-				if(color.a < gAlphaCutoff)
-					discard;
-				
-				return inColor;
-			}
-		};
+		SamplerState gMainTexSamp : register(s0);
+		Texture2D gMainTexture : register(t0);
+
+		float4 fsmain(in float4 inPos : SV_Position, 
+					   in float2 uv : TEXCOORD0,
+					   in float4 inColor : COLOR0) : SV_Target
+		{
+			float4 color = gMainTexture.Sample(gMainTexSamp, uv);
+			if(color.a < gAlphaCutoff)
+				discard;
+			
+			return inColor;
+		}
 	};
 };

+ 33 - 41
Data/Raw/Editor/Shaders/IconGizmo.bsl

@@ -1,31 +1,23 @@
-Parameters =
+technique IconGizmo
 {
-	mat4x4		gMatViewProj;
-	float4		gViewDir;
-	
-	Sampler2D 	gMainTexSamp : alias("gMainTexture");
-	Texture2D 	gMainTexture;
-};
-
-Blocks =
-{
-	Block Uniforms : auto("GizmoUniforms");
-};
-
-Technique =
-{
-	Pass =
+	pass
 	{
-		Target = 
+		blend
 		{
-			Blend = true;
-			Color = { SRCA, SRCIA, ADD };
+			target
+			{
+				enabled = true;
+				color = { srcA, srcIA, add };
+			};
 		};
 		
-		DepthWrite = false;
-		CompareFunc = LTE;
+		depth
+		{
+			write = false;
+			compare = lte;
+		};
 		
-		Vertex =
+		code
 		{
 			cbuffer Uniforms
 			{
@@ -33,7 +25,7 @@ Technique =
 				float4		gViewDir;
 			}
 
-			void main(
+			void vsmain(
 				in float3 inPos : POSITION,
 				in float2 uv : TEXCOORD0,
 				in float4 color : COLOR0,
@@ -45,14 +37,11 @@ Technique =
 				oUv = uv;
 				oColor = color;
 			}		
-		};
-		
-		Fragment =
-		{
+
 			SamplerState gMainTexSamp : register(s0);
 			Texture2D gMainTexture : register(t0);
 
-			float4 main(
+			float4 fsmain(
 				in float4 inPos : SV_Position, 
 				float2 uv : TEXCOORD0, 
 				float4 color : COLOR0) : SV_Target
@@ -62,18 +51,24 @@ Technique =
 		};
 	};
 	
-	Pass =
+	pass
 	{
-		Target = 
+		blend
 		{
-			Blend = true;
-			Color = { SRCA, SRCIA, ADD };
+			target
+			{
+				enabled = true;
+				color = { srcA, srcIA, add };
+			};
 		};
 		
-		DepthWrite = false;
-		CompareFunc = GT;
+		depth
+		{
+			write = false;
+			compare = gt;
+		};
 		
-		Vertex =
+		code
 		{
 			cbuffer Uniforms
 			{
@@ -81,7 +76,7 @@ Technique =
 				float4		gViewDir;
 			}
 
-			void main(
+			void vsmain(
 				in float3 inPos : POSITION,
 				in float2 uv : TEXCOORD0,
 				in float4 color : COLOR1,
@@ -93,14 +88,11 @@ Technique =
 				oUv = uv;
 				oColor = color;
 			}		
-		};
-		
-		Fragment =
-		{
+
 			SamplerState gMainTexSamp : register(s0);
 			Texture2D gMainTexture : register(t0);
 
-			float4 main(
+			float4 fsmain(
 				in float4 inPos : SV_Position, 
 				float2 uv : TEXCOORD0, 
 				float4 color : COLOR0) : SV_Target

+ 13 - 8
Data/Raw/Editor/Shaders/LineGizmo.bsl

@@ -1,16 +1,21 @@
 #include "$EDITOR$/LineGizmo.bslinc"
 
-Technique : inherits("LineGizmo") =
+technique LineGizmo
 {
-	Pass =
+	mixin LineGizmoBase;
+
+	raster
+	{
+		multisample = false; // This controls line rendering algorithm
+		lineaa = true;
+	};
+	
+	blend
 	{
-		Multisample = false; // This controls line rendering algorithm
-		AALine = true;
-		
-		Target =
+		target
 		{
-			Blend = true;
-			Color = { SRCA, SRCIA, ADD };
+			enabled = true;
+			color = { srcA, srcIA, add };
 		};
 	};
 };

+ 24 - 11
Data/Raw/Editor/Shaders/LineHandle.bsl

@@ -1,20 +1,33 @@
 #include "$EDITOR$/LineGizmo.bslinc"
 
-Technique : inherits("LineGizmo") =
+technique LineHandle
 {
-	Pass =
+	mixin LineGizmoBase;
+
+	depth
 	{
-		DepthWrite = false;
-		DepthRead = false;
-		Stencil = true;
-		StencilOpFront = { KEEP, KEEP, INC, PASS };
-		Multisample = false; // This controls line rendering algorithm
-		AALine = true;
+		write = false;
+		read = false;
+	};
+	
+	stencil
+	{
+		enabled = true;
+		front = { keep, keep, inc, pass };
+	};
 	
-		Target =
+	raster
+	{
+		multisample = false;
+		lineaa = true;
+	};
+	
+	blend
+	{
+		target
 		{
-			Blend = true;
-			Color = { SRCA, SRCIA, ADD };
+			enabled = true;
+			color = { srcA, srcIA, add };
 		};
 	};
 };

+ 5 - 3
Data/Raw/Editor/Shaders/PickingAlphaCullCCW.bsl

@@ -1,9 +1,11 @@
 #include "$EDITOR$/PickingAlphaCull.bslinc"
 
-Technique : inherits("PickingAlphaCull") =
+technique PickingAlphaCullCCW
 {
-	Pass =
+	mixin PickingAlphaCull;
+
+	raster
 	{
-		Cull = CCW;
+		cull = ccw;
 	};
 };

+ 5 - 3
Data/Raw/Editor/Shaders/PickingAlphaCullCW.bsl

@@ -1,9 +1,11 @@
 #include "$EDITOR$/PickingAlphaCull.bslinc"
 
-Technique : inherits("PickingAlphaCull") =
+technique PickingAlphaCullCW
 {
-	Pass =
+	mixin PickingAlphaCull;
+
+	raster
 	{
-		Cull = CW;
+		cull = cw;
 	};
 };

+ 5 - 3
Data/Raw/Editor/Shaders/PickingAlphaCullNone.bsl

@@ -1,9 +1,11 @@
 #include "$EDITOR$/PickingAlphaCull.bslinc"
 
-Technique : inherits("PickingAlphaCull") =
+technique PickingAlphaCullNone
 {
-	Pass =
+	mixin PickingAlphaCull;
+
+	raster
 	{
-		Cull = NOCULL;
+		cull = none;
 	};
 };

+ 5 - 3
Data/Raw/Editor/Shaders/PickingCullCCW.bsl

@@ -1,9 +1,11 @@
 #include "$EDITOR$/PickingCull.bslinc"
 
-Technique : inherits("PickingCull") =
+technique PickingCullCCW
 {
-	Pass =
+	mixin PickingCull;
+
+	raster
 	{
-		Cull = CCW;
+		cull = ccw;
 	};
 };

+ 5 - 3
Data/Raw/Editor/Shaders/PickingCullCW.bsl

@@ -1,9 +1,11 @@
 #include "$EDITOR$/PickingCull.bslinc"
 
-Technique : inherits("PickingCull") =
+technique PickingCullCW
 {
-	Pass =
+	mixin PickingCull;
+	
+	raster
 	{
-		Cull = CW;
+		cull = cw;
 	};
 };

+ 5 - 3
Data/Raw/Editor/Shaders/PickingCullNone.bsl

@@ -1,9 +1,11 @@
 #include "$EDITOR$/PickingCull.bslinc"
 
-Technique : inherits("PickingCull") =
+technique PickingCullNone
 {
-	Pass =
+	mixin PickingCull;
+
+	raster
 	{
-		Cull = NOCULL;
+		cull = none;
 	};
 };

+ 64 - 69
Data/Raw/Editor/Shaders/SceneGrid.bsl

@@ -1,87 +1,82 @@
-Priority = -10000;
-
-Parameters =
+options
 {
-	mat4x4		matViewProj;
-	float4		worldCameraPos;
-	color		gridColor;
-	float3		gridPlaneNormal;
-	float		gridSpacing;
-	float		gridBorderWidth;
-	float		gridFadeOutStart;
-	float		gridFadeOutEnd;
+	priority = -10000;
 };
 
-Technique =
+technique SceneGrid
 {
-	Pass =
+	depth
+	{
+		write = false;
+	};
+	
+	raster
 	{
-		DepthWrite = false;
-		Cull = NOCULL;
-		
-		Target =
+		cull = none;
+	};
+
+	blend
+	{
+		target
 		{
-			Blend = true;
-			Color = { SRCA, SRCIA, ADD };
-			WriteMask = RGB;
+			enabled = true;
+			color = { srcA, srcIA, add };
+			writemask = RGB;
+		};
+	};
+
+	code
+	{
+		cbuffer VertParams
+		{	
+			float4x4 matViewProj;
 		};
 
-		Vertex =
+		void vsmain(
+			in float3 inPos : POSITION,
+			out float4 oPosition : SV_Position,
+			out float3 oWorldPos : TEXCOORD0)
 		{
-			cbuffer VertParams
-			{	
-				float4x4 matViewProj;
-			};
+			oPosition = mul(matViewProj, float4(inPos.xyz, 1));
+			oWorldPos = inPos;
+		}
 
-			void main(
-				in float3 inPos : POSITION,
-				out float4 oPosition : SV_Position,
-				out float3 oWorldPos : TEXCOORD0)
-			{
-				oPosition = mul(matViewProj, float4(inPos.xyz, 1));
-				oWorldPos = inPos;
-			}
+		cbuffer FragParams
+		{	
+			float4 worldCameraPos;
+			float gridSpacing;
+			float gridBorderWidth;
+			float4 gridColor;
+			float gridFadeOutStart;
+			float gridFadeOutEnd;
+			float3 gridPlaneNormal; // Must be one of the basis vectors
 		};
-		
-		Fragment =
-		{
-			cbuffer FragParams
-			{	
-				float4 worldCameraPos;
-				float gridSpacing;
-				float gridBorderWidth;
-				float4 gridColor;
-				float gridFadeOutStart;
-				float gridFadeOutEnd;
-				float3 gridPlaneNormal; // Must be one of the basis vectors
-			};
 
-			float3 sampleGrid(float3 position)
-			{
-				float3 count = round(position / gridSpacing);
-				
-				// Adding grid plane normal ensures that the remainer for the unused axis is not zero, otherwise
-				// the sampled value would always be 1.
-				float3 remainder = abs(position - count * gridSpacing) + gridPlaneNormal;
+		float3 sampleGrid(float3 position)
+		{
+			float3 count = round(position / gridSpacing);
+			
+			// Adding grid plane normal ensures that the remainer for the unused axis is not zero, otherwise
+			// the sampled value would always be 1.
+			float3 remainder = abs(position - count * gridSpacing) + gridPlaneNormal;
 
-				float3 derivX = ddx(position);
-				float3 derivY = ddy(position);
-				float3 gradientLength = float3(length(float2(derivX.x, derivY.x)), 
-					length(float2(derivX.y, derivY.y)), length(float2(derivX.z, derivY.z)));
+			float3 derivX = ddx(position);
+			float3 derivY = ddy(position);
+			float3 gradientLength = float3(length(float2(derivX.x, derivY.x)), 
+				length(float2(derivX.y, derivY.y)), length(float2(derivX.z, derivY.z)));
 
-				return 1.0f - smoothstep(gridBorderWidth, gridBorderWidth + gradientLength, remainder);
-			}
+			return 1.0f - smoothstep(gridBorderWidth, gridBorderWidth + gradientLength, remainder);
+		}
 
-			float4 main(in float4 inPos : SV_Position, in float3 inWorldPos : TEXCOORD0) : SV_Target
-			{
-				float3 sampValue = sampleGrid(inWorldPos);
+		float4 fsmain(in float4 inPos : SV_Position, in float3 inWorldPos : TEXCOORD0) : SV_Target
+		{
+			float3 sampValue = sampleGrid(inWorldPos);
 
-				float4 outColor = gridColor;
-				outColor.a = max(max(sampValue.x, sampValue.y), sampValue.z) * 
-					smoothstep(gridFadeOutEnd, gridFadeOutStart, length(inWorldPos - worldCameraPos));
-				
-				return outColor;
-			}
-		};
+			float4 outColor = gridColor;
+			outColor.a = max(max(sampValue.x, sampValue.y), sampValue.z) * 
+				smoothstep(gridFadeOutEnd, gridFadeOutStart, length(inWorldPos - worldCameraPos));
+			
+			return outColor;
+		}
 	};
 };

+ 13 - 9
Data/Raw/Editor/Shaders/Selection.bsl

@@ -10,24 +10,28 @@
 #define USE_SKELETON
 #include "$EDITOR$\SelectionBase.bslinc"
 
-Technique 
- : inherits("Selection") =
-{ };
+technique Selection1
+{ 
+	mixin Selection;
+};
 
-Technique 
- : inherits("SelectionSkinned") =
+technique Selection2
 {
+	mixin SelectionSkinned;
+
 	Tags = { "Skinned" };
 };
 
-Technique 
- : inherits("SelectionMorph") =
+technique Selection3
 {
+	mixin SelectionMorph;
+
 	Tags = { "Morph" };
 };
 
-Technique 
- : inherits("SelectionSkinnedMorph") =
+technique Selection4
 {
+	mixin SelectionSkinnedMorph;
+
 	Tags = { "SkinnedMorph" };
 };

+ 4 - 2
Data/Raw/Editor/Shaders/SolidGizmo.bsl

@@ -1,4 +1,6 @@
 #include "$EDITOR$/SolidGizmo.bslinc"
 
-Technique : inherits("SolidGizmo") =
-{ };
+technique SolidGizmo
+{ 
+	mixin SolidGizmoBase;
+};

+ 24 - 11
Data/Raw/Editor/Shaders/SolidHandle.bsl

@@ -1,19 +1,32 @@
 #include "$EDITOR$/SolidGizmo.bslinc"
-Priority = 10;
 
-Technique : inherits("SolidGizmo") =
+options
 {
-	Pass =
+	priority = 10;
+}
+
+technique SolidGizmo
+{
+	mixin SolidGizmoBase;
+
+	depth
+	{
+		write = false;
+		read = false;
+	};
+	
+	stencil
+	{
+		enabled = true;
+		front = { keep, keep, inc, pass };
+	};
+	
+	blend
 	{
-		DepthWrite = false;
-		DepthRead = false;
-		Stencil = true;
-		StencilOpFront = { KEEP, KEEP, INC, PASS };
-		
-		Target =
+		target
 		{
-			Blend = true;
-			Color = { SRCA, SRCIA, ADD };
+			enabled = true;
+			color = { srcA, srcIA, add };
 		};
 	};
 };

+ 39 - 53
Data/Raw/Editor/Shaders/TextGizmo.bsl

@@ -1,63 +1,49 @@
-Parameters =
+technique TextGizmo
 {
-	mat4x4		gMatViewProj;
-	float4		gViewDir;
-	
-	Sampler2D 	gMainTexSamp : alias("gMainTexture");
-	Texture2D 	gMainTexture;
-};
-
-Blocks =
-{
-	Block Uniforms : auto("GizmoUniforms");
-};
-
-Technique =
-{
-	Pass =
+	blend
 	{
-		Target = 
+		target 
 		{
-			Blend = true;
-			Color = { SRCA, SRCIA, ADD };
+			enabled true;
+			color = { srcA, srcIA, add };
 		};
-		
-		DepthWrite = false;
-		
-		Vertex =
+	};
+	
+	depth
+	{
+		write = false;
+	};
+	
+	code
+	{
+		cbuffer Uniforms
 		{
-			cbuffer Uniforms
-			{
-				float4x4 	gMatViewProj;
-				float4		gViewDir;
-			}
+			float4x4 	gMatViewProj;
+			float4		gViewDir;
+		}
 
-			void main(
-				in float3 inPos : POSITION,
-				in float2 uv : TEXCOORD0,
-				in float4 color : COLOR0,
-				out float4 oPosition : SV_Position,
-				out float2 oUv : TEXCOORD0,
-				out float4 oColor : COLOR0)
-			{
-				oPosition = mul(gMatViewProj, float4(inPos.xyz, 1));
-				oUv = uv;
-				oColor = color;
-			}		
-		};
-		
-		Fragment =
+		void vsmain(
+			in float3 inPos : POSITION,
+			in float2 uv : TEXCOORD0,
+			in float4 color : COLOR0,
+			out float4 oPosition : SV_Position,
+			out float2 oUv : TEXCOORD0,
+			out float4 oColor : COLOR0)
 		{
-			SamplerState gMainTexSamp : register(s0);
-			Texture2D gMainTexture : register(t0);
+			oPosition = mul(gMatViewProj, float4(inPos.xyz, 1));
+			oUv = uv;
+			oColor = color;
+		}		
 
-			float4 main(
-				in float4 inPos : SV_Position, 
-				float2 uv : TEXCOORD0, 
-				float4 color : COLOR0) : SV_Target
-			{
-				return float4(color.rgb, gMainTexture.Sample(gMainTexSamp, uv).r * color.a);
-			}		
-		};
+		SamplerState gMainTexSamp : register(s0);
+		Texture2D gMainTexture : register(t0);
+
+		float4 fsmain(
+			in float4 inPos : SV_Position, 
+			float2 uv : TEXCOORD0, 
+			float4 color : COLOR0) : SV_Target
+		{
+			return float4(color.rgb, gMainTexture.Sample(gMainTexSamp, uv).r * color.a);
+		}		
 	};
 };

+ 23 - 37
Data/Raw/Editor/Shaders/WireGizmo.bsl

@@ -1,45 +1,31 @@
-Parameters =
+technique WireGizmo
 {
-	mat4x4		gMatViewProj;
-	float4		gViewDir;
-};
-
-Blocks =
-{
-	Block Uniforms : auto("GizmoUniforms");
-};
+	raster
+	{
+		fill = wire;
+	};
 
-Technique =
-{
-	Pass =
+	code
 	{
-		Fill = WIRE;
-	
-		Vertex =
+		cbuffer Uniforms
 		{
-			cbuffer Uniforms
-			{
-				float4x4 	gMatViewProj;
-				float4		gViewDir;
-			}
-			
-			void main(
-				in float3 inPos : POSITION,
-				in float4 color : COLOR0,
-				out float4 oPosition : SV_Position,
-				out float4 oColor : COLOR0)
-			{
-				oPosition = mul(gMatViewProj, float4(inPos.xyz, 1));
-				oColor = color;
-			}
-		};
+			float4x4 	gMatViewProj;
+			float4		gViewDir;
+		}
 		
-		Fragment =
+		void vsmain(
+			in float3 inPos : POSITION,
+			in float4 color : COLOR0,
+			out float4 oPosition : SV_Position,
+			out float4 oColor : COLOR0)
+		{
+			oPosition = mul(gMatViewProj, float4(inPos.xyz, 1));
+			oColor = color;
+		}
+
+		float4 fsmain(in float4 inPos : SV_Position, in float4 color : COLOR0) : SV_Target
 		{
-			float4 main(in float4 inPos : SV_Position, in float4 color : COLOR0) : SV_Target
-			{
-				return color;
-			}
-		};
+			return color;
+		}
 	};
 };

+ 76 - 79
Data/Raw/Engine/Includes/ShadowDepthBase.bslinc

@@ -9,106 +9,103 @@
 #include "$ENGINE$\NormalVertexInput.bslinc"
 #undef USE_BLEND_SHAPES
 
-Technique : base("ShadowDepthBase") =
+mixin ShadowDepthBase
 {
-	Pass =
+	code
 	{
-		Common =
+		struct ShadowVStoFS
 		{
-			struct ShadowVStoFS
-			{
-				float4 position : SV_Position;
-				
-				#ifdef USES_GS
-				float4 worldPos : TEXCOORD0;
-				#endif
-			};
+			float4 position : SV_Position;
 			
-			cbuffer ShadowParams
-			{
-				float gDepthBias;
-				float gDepthRange;
-			};
+			#ifdef USES_GS
+			float4 worldPos : TEXCOORD0;
+			#endif
 		};
-	
-		Vertex =
+		
+		cbuffer ShadowParams
 		{
-			void linearizeDepth(inout float4 clipPos)
+			float gDepthBias;
+			float gDepthRange;
+		};
+
+		void linearizeDepth(inout float4 clipPos)
+		{
+			// Clamp to near plane if behind it
+			if (clipPos.z < 0)
 			{
-				// Clamp to near plane if behind it
-				if (clipPos.z < 0)
-				{
-					clipPos.z = 0.000001f;
-					clipPos.w = 1.0f;
-				}
+				clipPos.z = 0.000001f;
+				clipPos.w = 1.0f;
+			}
 
-				// Output linear depth in range [0, 1]
-				// TODO - Handle case for backends using [-1, 1] depth range
-				float linearDepth = clipPos.z * gDepthRange + gDepthBias;
-				clipPos.z = linearDepth * clipPos.w;
-			}		
+			// Output linear depth in range [0, 1]
+			// TODO - Handle case for backends using [-1, 1] depth range
+			float linearDepth = clipPos.z * gDepthRange + gDepthBias;
+			clipPos.z = linearDepth * clipPos.w;
+		}		
+	
+		ShadowVStoFS vsmain(VertexInput_PO input)
+		{
+			ShadowVStoFS output;
 		
-			ShadowVStoFS main(VertexInput_PO input)
-			{
-				ShadowVStoFS output;
+			float4 worldPosition = getVertexWorldPosition(input);
 			
-				float4 worldPosition = getVertexWorldPosition(input);
-				
-				#ifdef USES_GS
-				output.worldPos = worldPosition;
-				output.position = worldPosition;
-				#else
-				float4 clipPos = mul(gMatViewProj, worldPosition);
-				linearizeDepth(clipPos);
-				
-				output.position = clipPos;
-				#endif
-				
-				return output;
-			}
-		};
+			#ifdef USES_GS
+			output.worldPos = worldPosition;
+			output.position = worldPosition;
+			#else
+			float4 clipPos = mul(gMatViewProj, worldPosition);
+			linearizeDepth(clipPos);
+			
+			output.position = clipPos;
+			#endif
+			
+			return output;
+		}
 	};
 };
 
-Technique 
- : inherits("GBufferOutput")
- : inherits("PerCameraData")
- : inherits("PerObjectData")
- : inherits("NormalVertexInput")
- : inherits("ShadowDepthBase")
- : inherits("ShadowDepth") =
+technique ShadowDepth
 {
+	mixin GBufferOutput;
+	mixin PerCameraData;
+	mixin PerObjectData;
+	mixin NormalVertexInput;
+	mixin ShadowDepthBase;
+	mixin ShadowDepth;
 };
 
-Technique 
- : inherits("GBufferOutput")
- : inherits("PerCameraData")
- : inherits("PerObjectData")
- : inherits("SkinnedVertexInput")
- : inherits("ShadowDepthBase")
- : inherits("ShadowDepth") =
+technique ShadowDepthSkinned
 {
-	Tags = { "Skinned" };
+	mixin GBufferOutput;
+	mixin PerCameraData;
+	mixin PerObjectData;
+	mixin SkinnedVertexInput;
+	mixin ShadowDepthBase;
+	mixin ShadowDepth;
+
+	tags = { "Skinned" };
 };
 
-Technique 
- : inherits("GBufferOutput")
- : inherits("PerCameraData")
- : inherits("PerObjectData")
- : inherits("MorphVertexInput")
- : inherits("ShadowDepthBase")
- : inherits("ShadowDepth") =
+technique ShadowDepthMorph
 {
-	Tags = { "Morph" };
+	mixin GBufferOutput;
+	mixin PerCameraData;
+	mixin PerObjectData;
+	mixin MorphVertexInput;
+	mixin ShadowDepthBase;
+	mixin ShadowDepth;
+
+	tags = { "Morph" };
 };
 
-Technique 
- : inherits("GBufferOutput")
- : inherits("PerCameraData")
- : inherits("PerObjectData")
- : inherits("SkinnedMorphVertexInput")
- : inherits("ShadowDepthBase")
- : inherits("ShadowDepth") =
+technique ShadowDepthSkinnedMorph
 {
-	Tags = { "SkinnedMorph" };
+	mixin GBufferOutput;
+	mixin PerCameraData;
+	mixin PerObjectData;
+	mixin SkinnedMorphVertexInput;
+	mixin ShadowDepthBase;
+	mixin ShadowDepth;
+
+	tags = { "SkinnedMorph" };
 };

+ 44 - 47
Data/Raw/Engine/Shaders/ShadowDepthCube.bsl

@@ -1,65 +1,62 @@
 #define USES_GS
 #include "$ENGINE$\ShadowDepthBase.bslinc"
 
-Technique : base("ShadowDepth") =
+mixin ShadowDepth
 { 
-	Pass =
+	code
 	{
-		Geometry =
+		struct GSToPS
 		{
-			struct GSToPS
-			{
-				float4 position : SV_Position;
-				uint targetIdx : SV_RenderTargetArrayIndex;
-			};
+			float4 position : SV_Position;
+			uint targetIdx : SV_RenderTargetArrayIndex;
+		};
 
-			cbuffer ShadowCubeParams
-			{
-				float4x4 gFaceVPMatrices[6];
-				uint gFaceMasks[6];
-				uint padding[2];
-			};
-			
-			[maxvertexcount(18)]
-			void main(triangle ShadowVStoFS inputs[3], inout TriangleStream<GSToPS> outStream)
+		cbuffer ShadowCubeParams
+		{
+			float4x4 gFaceVPMatrices[6];
+			uint gFaceMasks[6];
+			uint padding[2];
+		};
+		
+		[maxvertexcount(18)]
+		void gsmain(triangle ShadowVStoFS inputs[3], inout TriangleStream<GSToPS> outStream)
+		{
+			// Output a triangle to all relevant faces
+			[unroll]
+			for (int faceIdx = 0; faceIdx < 6; faceIdx++)
 			{
-				// Output a triangle to all relevant faces
-				[unroll]
-				for (int faceIdx = 0; faceIdx < 6; faceIdx++)
+				// Check the per-object masks that were determined based on CPU frustum culling
+				[branch]
+				if (gFaceMasks[faceIdx] > 0)
 				{
-					// Check the per-object masks that were determined based on CPU frustum culling
-					[branch]
-					if (gFaceMasks[faceIdx] > 0)
-					{
-						float4 clipPos[3];
-						
-						[unroll]
-						for (int vertIdx = 0; vertIdx < 3; vertIdx++)
-							clipPos[vertIdx] = mul(gFaceVPMatrices[faceIdx], inputs[vertIdx].worldPos);
+					float4 clipPos[3];
+					
+					[unroll]
+					for (int vertIdx = 0; vertIdx < 3; vertIdx++)
+						clipPos[vertIdx] = mul(gFaceVPMatrices[faceIdx], inputs[vertIdx].worldPos);
 
-						// Per-triangle frustum culling
-						// Note: Test if this helps or hurts performance
-						float4 testMask = saturate(clipPos[0].xyxy * float4(-1, -1, 1, 1) - clipPos[0].w);
-						testMask *= saturate(clipPos[1].xyxy * float4(-1, -1, 1, 1) - clipPos[1].w);
-						testMask *= saturate(clipPos[2].xyxy * float4(-1, -1, 1, 1) - clipPos[2].w);
+					// Per-triangle frustum culling
+					// Note: Test if this helps or hurts performance
+					float4 testMask = saturate(clipPos[0].xyxy * float4(-1, -1, 1, 1) - clipPos[0].w);
+					testMask *= saturate(clipPos[1].xyxy * float4(-1, -1, 1, 1) - clipPos[1].w);
+					testMask *= saturate(clipPos[2].xyxy * float4(-1, -1, 1, 1) - clipPos[2].w);
 
-						[branch]	
-						if (all(testMask == 0))
-						{				
-							GSToPS output;
-							output.targetIdx = faceIdx;
+					[branch]	
+					if (all(testMask == 0))
+					{				
+						GSToPS output;
+						output.targetIdx = faceIdx;
 
-							[unroll]
-							for (int vertIdx = 0; vertIdx < 3; vertIdx++)
-							{
-								output.position = clipPos[vertIdx];
-								outStream.Append(output);
-							}
-							outStream.RestartStrip();
+						[unroll]
+						for (int vertIdx = 0; vertIdx < 3; vertIdx++)
+						{
+							output.position = clipPos[vertIdx];
+							outStream.Append(output);
 						}
+						outStream.RestartStrip();
 					}
 				}
 			}
-		};
+		}
 	};
 };

+ 1 - 1
Data/Raw/Engine/Shaders/ShadowDepthNormal.bsl

@@ -1,4 +1,4 @@
 #include "$ENGINE$\ShadowDepthBase.bslinc"
 
-Technique : base("ShadowDepth") =
+mixin ShadowDepth
 { };

+ 0 - 1
Source/BansheeSL/BsLexerFX.l

@@ -24,7 +24,6 @@ DEFINE_EXPR		[^\r\n]*
 	/* Start conditions */
 %x INCLUDE
 %x CODEBLOCK_HEADER
-%x CODEBLOCK_EQUALS
 %x CODEBLOCK
 %x CODEBLOCK_END
 %x DEFINE_COND

+ 0 - 1
Source/BansheeSL/BsParserFX.y

@@ -151,7 +151,6 @@ typedef struct YYLTYPE {
 
 %type <nodePtr>		target;
 %type <nodePtr>		target_header;
-%type <nodeOption>	target_statement;
 %type <nodeOption>	target_option;
 
 %type <nodePtr>		blend_color_header;

+ 1 - 1
Source/BansheeUtility/Source/BsDataStream.cpp

@@ -249,7 +249,7 @@ namespace bs
 	MemoryDataStream::MemoryDataStream(size_t size)
 		: DataStream(READ | WRITE), mData(nullptr), mFreeOnClose(true)
 	{
-		mData = mPos = (UINT8*)bs_alloc(size);
+		mData = mPos = (UINT8*)bs_alloc((UINT32)size);
 		mSize = size;
 		mEnd = mData + mSize;
 

+ 1 - 1
Source/BansheeUtility/Source/BsTextureAtlasLayout.cpp

@@ -119,7 +119,7 @@ namespace bs
 	{
 		for (size_t i = 0; i < elements.size(); i++)
 		{
-			elements[i].output.idx = i; // Preserve original index before sorting
+			elements[i].output.idx = (UINT32)i; // Preserve original index before sorting
 			elements[i].output.page = -1;
 		}