Просмотр исходного кода

Remaining shaders ported to the unified shading model

BearishSun 8 лет назад
Родитель
Сommit
5bca4bf8dc

+ 1 - 47
Data/Raw/Editor/Includes/LineGizmo.bslinc

@@ -11,8 +11,6 @@ Blocks =
 
 Technique : base("LineGizmo") =
 {
-	Language = "HLSL11";
-	
 	Pass =
 	{
 		Vertex =
@@ -42,48 +40,4 @@ Technique : base("LineGizmo") =
 			}
 		};
 	};
-};
-
-Technique : base("LineGizmo") =
-{
-	Language = "GLSL";
-	
-	Pass =
-	{
-		Vertex =
-		{
-			layout(location = 0) in vec3 bs_position;
-			layout(location = 1) in vec4 bs_color0;
-			
-			layout(location = 0) out vec4 color0;
-
-			out gl_PerVertex
-			{
-				vec4 gl_Position;
-			};
-
-			layout(binding = 0, std140) uniform Uniforms
-			{
-				mat4 	gMatViewProj;
-				vec4	gViewDir;
-			};
-			
-			void main()
-			{
-				gl_Position = gMatViewProj * vec4(bs_position.xyz, 1);
-				color0 = bs_color0;
-			}
-		};
-		
-		Fragment =
-		{
-			layout(location = 0) in vec4 color0;
-			layout(location = 0) out vec4 fragColor;
-
-			void main()
-			{
-				fragColor = color0;
-			}
-		};
-	};
-};
+};

+ 1 - 65
Data/Raw/Editor/Includes/PickingAlphaCull.bslinc

@@ -15,8 +15,6 @@ Blocks =
 
 Technique : base("PickingAlphaCull") =
 {
-	Language = "HLSL11";
-	
 	Pass =
 	{
 		Scissor = true;
@@ -67,66 +65,4 @@ Technique : base("PickingAlphaCull") =
 			}
 		};
 	};
-};
-
-Technique : base("PickingAlphaCull") =
-{
-	Language = "GLSL";
-	
-	Pass =
-	{
-		Scissor = true;
-
-		Common =
-		{
-			layout(binding = 0, std140) uniform Uniforms
-			{
-				mat4 	gMatWorldViewProj;
-				vec4	gColorIndex;
-				float	gAlphaCutoff;
-			};
-		};		
-		
-		Vertex =
-		{		
-			layout(location = 0) in vec3 bs_position;
-			layout(location = 1) in vec2 bs_texcoord0;
-			layout(location = 2) in vec3 bs_normal;
-			
-			layout(location = 0) out vec4 normal;
-			layout(location = 1) out vec2 texcoord0;
-
-			out gl_PerVertex
-			{
-				vec4 gl_Position;
-			};
-						
-			void main()
-			{
-				gl_Position = gMatWorldViewProj * vec4(bs_position.xyz, 1);
-				texcoord0 = bs_texcoord0;
-				normal = vec4(bs_normal, 0);
-			}
-		};
-		
-		Fragment =
-		{
-			layout(location = 0) in vec4 normal;
-			layout(location = 1) in vec2 texcoord0;		
-		
-			layout(location = 0) out vec4[2] outColor;
-
-			layout(binding = 2) uniform sampler2D gMainTexture;
-
-			void main()
-			{
-				vec4 color = texture(gMainTexture, texcoord0);
-				if(color.a < gAlphaCutoff)
-					discard;
-					
-				outColor[0] = gColorIndex;
-				outColor[1] = (normal + vec4(1,1,1,0)) / 2;	
-			}
-		};
-	};
-};
+};

+ 1 - 54
Data/Raw/Editor/Includes/PickingCull.bslinc

@@ -12,8 +12,6 @@ Blocks =
 
 Technique : base("PickingCull") =
 {
-	Language = "HLSL11";
-	
 	Pass =
 	{
 		Scissor = true;
@@ -54,55 +52,4 @@ Technique : base("PickingCull") =
 			}
 		};
 	};
-};
-
-Technique : base("PickingCull") =
-{
-	Language = "GLSL";
-	
-	Pass =
-	{
-		Scissor = true;
-		
-		Common =
-		{
-			layout(binding = 0, std140) uniform Uniforms
-			{
-				mat4 	gMatWorldViewProj;
-				vec4	gColorIndex;
-				float	gAlphaCutoff;
-			};
-		};
-
-		Vertex =
-		{
-			layout(location = 0) in vec3 bs_position;
-			layout(location = 1) in vec3 bs_normal;
-			
-			layout(location = 0) out vec4 normal;
-			
-			out gl_PerVertex
-			{
-				vec4 gl_Position;
-			};
-			
-			void main()
-			{
-				normal = vec4(bs_normal,0);
-				gl_Position = gMatWorldViewProj * vec4(bs_position.xyz, 1);
-			}
-		};
-		
-		Fragment =
-		{
-			layout(location = 0) in vec4 normal;
-			layout(location = 0) out vec4[2] outColor;
-
-			void main()
-			{
-				outColor[0] = gColorIndex;
-				outColor[1] = (normal + vec4(1,1,1,0)) / 2;
-			}
-		};
-	};
-};
+};

+ 5 - 132
Data/Raw/Editor/Includes/SelectionBase.bslinc

@@ -7,8 +7,6 @@ Parameters =
 
 Technique : base("SelectionBase") =
 {
-	Language = "HLSL11";
-	
 	Pass =
 	{
 		Fill = WIRE;
@@ -48,8 +46,6 @@ Technique
 #endif
  : inherits("SelectionBase") = 
 {
-	Language = "HLSL11";
-
 	Vertex =
 	{
 		struct VertexInput
@@ -67,8 +63,11 @@ Technique
 			#endif
 		};	
 	
-		float4x4 matWorldViewProj;
-	
+		cbuffer VertParams
+		{	
+			float4x4 matWorldViewProj;
+		};
+		
 #ifdef USE_SKELETON
 		StructuredBuffer<float4> boneMatrices;
 		
@@ -108,130 +107,4 @@ Technique
 			oPosition = mul(matWorldViewProj, position);
 		}
 	};
-};
-
-Technique : base("SelectionBase") =
-{
-	Language = "GLSL";
-	
-	Pass =
-	{
-		Fill = WIRE;
-		DepthBias = 0.00001f;
-		
-		Target =
-		{
-			Blend = true;
-			Color = { SRCA, SRCIA, ADD };
-		};
-		
-		Fragment =
-		{
-			layout(location = 0) out vec4 fragColor;
-		
-			layout(binding = 0) uniform FragUBO
-			{
-				vec4 selColor;
-			};
-		
-			void main()
-			{
-				fragColor = selColor;
-			}
-		};
-	};
-};
-
-Technique
-#ifdef USE_BLEND_SHAPES
-	#ifdef USE_SKELETON
-	 : base("SelectionSkinnedMorph")
-	#else
-	 : base("SelectionMorph")
-	#endif
-#else
-	#ifdef USE_SKELETON
-	 : base("SelectionSkinned")
-	#else
-	 : base("Selection")
-	#endif
-#endif
- : inherits("SelectionBase") = 
-{
-	Language = "GLSL";
-	
-	Vertex =
-	{
-		layout(location = 0) in vec3 bs_position;
-	
-		#ifdef USE_SKELETON
-			layout(location = 1) in ivec4 bs_blendindices;
-			layout(location = 2) in vec4 bs_blendweights;
-		#endif
-			
-		#ifdef USE_BLEND_SHAPES
-			layout(location = 3) in vec3 bs_position1;
-			layout(location = 4) in vec4 bs_normal1;
-		#endif
-		
-		out gl_PerVertex
-		{
-			vec4 gl_Position;
-		};
-		
-		layout(binding = 1) uniform VertUBO
-		{
-			mat4 matWorldViewProj;
-		};	
-		
-#ifdef USE_SKELETON
-		layout(binding = 2) uniform samplerBuffer boneMatrices;
-		
-		void getBoneMatrix(int idx, out mat4x3 result)
-		{
-			mat3x4 temp;
-		
-			temp[0] = texelFetch(boneMatrices, idx * 3 + 0);
-			temp[1] = texelFetch(boneMatrices, idx * 3 + 1);
-			temp[2] = texelFetch(boneMatrices, idx * 3 + 2);
-			
-			result = transpose(temp);				
-		}
-		
-		void getBlendMatrix(out mat4x3 result)
-		{
-			mat4x3 boneMatrix;
-			
-			getBoneMatrix(bs_blendindices.x, boneMatrix);
-			result = bs_blendweights.x * boneMatrix;
-			
-			getBoneMatrix(bs_blendindices.y, boneMatrix);
-			result += bs_blendweights.y * boneMatrix;
-			
-			getBoneMatrix(bs_blendindices.z, boneMatrix);
-			result += bs_blendweights.z * boneMatrix;
-			
-			getBoneMatrix(bs_blendindices.w, boneMatrix);
-			result += bs_blendweights.w * boneMatrix;
-		}
-#endif
-		
-		void main()
-		{
-#ifdef USE_BLEND_SHAPES
-			vec4 position = vec4(bs_position + bs_position1, 1.0f);
-#else
-			vec4 position = vec4(bs_position, 1.0f);
-#endif		
-		
-#ifdef USE_SKELETON
-			mat4x3 blendMatrix;
-			getBlendMatrix(blendMatrix);
-			
-			position = vec4(blendMatrix * position, 1.0f);
-#endif
-
-			gl_Position = matWorldViewProj * position;
-		}
-	};
 };

+ 1 - 56
Data/Raw/Editor/Includes/SolidGizmo.bslinc

@@ -11,8 +11,6 @@ Blocks =
 
 Technique : base("SolidGizmo") =
 {
-	Language = "HLSL11";
-	
 	Pass =
 	{
 		Common =
@@ -51,57 +49,4 @@ Technique : base("SolidGizmo") =
 			}
 		};
 	};
-};
-
-Technique : base("SolidGizmo") =
-{
-	Language = "GLSL";
-	
-	Pass =
-	{
-		Common =
-		{
-			layout(binding = 0, std140) uniform Uniforms
-			{
-				mat4 	gMatViewProj;
-				vec4	gViewDir;
-			};
-		};
-	
-		Vertex =
-		{
-			layout(location = 0) in vec3 bs_position;
-			layout(location = 1) in vec3 bs_normal;
-			layout(location = 2) in vec4 bs_color0;
-			
-			layout(location = 0) out vec3 normal;
-			layout(location = 1) out vec4 color0;
-
-			out gl_PerVertex
-			{
-				vec4 gl_Position;
-			};		
-		
-			void main()
-			{
-				gl_Position = gMatViewProj * vec4(bs_position.xyz, 1);
-				normal = bs_normal;
-				color0 = bs_color0;
-			}
-		};
-		
-		Fragment =
-		{
-			layout(location = 0) in vec3 normal;
-			layout(location = 1) in vec4 color0;
-			
-			layout(location = 0) out vec4 fragColor;
-
-			void main()
-			{
-				fragColor = color0 * dot(normalize(normal), -gViewDir.xyz);
-				fragColor.a = color0.a;
-			}
-		};
-	};
-};
+};

+ 0 - 47
Data/Raw/Editor/Shaders/ClearHandleAlpha.bsl

@@ -1,7 +1,5 @@
 Technique =
 {
-	Language = "HLSL11";
-	
 	Pass =
 	{
 		Target = 
@@ -32,49 +30,4 @@ Technique =
 			}	
 		};	
 	};
-};
-
-Technique =
-{
-	Language = "GLSL";
-	
-	Pass =
-	{
-		Target = 
-		{
-			WriteMask = A;
-		};
-		
-		DepthRead = false;
-		DepthWrite = false;	
-	
-		Stencil = true;
-		StencilOpFront = { KEEP, KEEP, KEEP, LTE };
-		StencilRef = 1;	
-	
-		Vertex =
-		{
-			layout(location = 0) in vec3 bs_position;
-
-			out gl_PerVertex
-			{
-				vec4 gl_Position;
-			};
-			
-			void main()
-			{
-				gl_Position = vec4(bs_position.xy, 0, 1);
-			}
-		};
-		
-		Fragment =
-		{
-			layout(location = 0) out vec4 fragColor;
-
-			void main()
-			{
-				fragColor = vec4(0, 0, 0, 1);
-			}
-		};
-	};
 };

+ 8 - 71
Data/Raw/Editor/Shaders/DockDropOverlay.bsl

@@ -10,8 +10,6 @@ Parameters =
 
 Technique =
 {
-	Language = "HLSL11";
-	
 	Pass =
 	{
 		Target = 
@@ -25,12 +23,15 @@ Technique =
 		
 		Vertex =
 		{
-			float invViewportWidth;
-			float invViewportHeight;
+			cbuffer Uniforms
+			{	
+				float invViewportWidth;
+				float invViewportHeight;
 
-			float4 tintColor;
-			float4 highlightColor;
-			float4 highlightActive;
+				float4 tintColor;
+				float4 highlightColor;
+				float4 highlightActive;
+			};
 
 			void main(
 			in float2 inPos : POSITION,
@@ -58,68 +59,4 @@ Technique =
 			}	
 		};
 	};
-};
-
-Technique =
-{
-	Language = "GLSL";
-	
-	Pass =
-	{
-		Target = 
-		{
-			Blend = true;
-			Color = { SRCA, SRCIA, ADD };
-		};
-		
-		DepthRead = false;
-		DepthWrite = false;
-		
-		Vertex =
-		{
-			layout(location = 0) in vec2 bs_position;
-			layout(location = 1) in vec4 bs_color0;
-			
-			layout(location = 0) out vec4 color0;
-			
-			out gl_PerVertex
-			{
-				vec4 gl_Position;
-			};			
-			
-			layout(binding = 0) uniform VertUBO
-			{
-				float invViewportWidth;
-				float invViewportHeight;
-
-				vec4 tintColor;
-				vec4 highlightColor;
-				vec4 highlightActive;
-			};
-
-			void main()
-			{
-				float tfrmdX = -1.0f + (bs_position.x * invViewportWidth);
-				float tfrmdY = 1.0f - (bs_position.y * invViewportHeight);
-
-				gl_Position = vec4(tfrmdX, tfrmdY, 0, 1);
-
-				vec4 highlight = highlightActive * bs_color0;
-				float highlightSum = highlight.x + highlight.y + highlight.z + highlight.w;
-
-				color0 = (1.0f - highlightSum) * tintColor + highlightSum * highlightColor;
-			}
-		};
-		
-		Fragment =
-		{
-			layout(location = 0) in vec4 color0;
-			layout(location = 0) out vec4 fragColor;
-
-			void main()
-			{
-				fragColor = color0;
-			}
-		};
-	};
 };

+ 0 - 48
Data/Raw/Editor/Shaders/GizmoPicking.bsl

@@ -11,8 +11,6 @@ Blocks =
 
 Technique =
 {
-	Language = "HLSL11";
-	
 	Pass =
 	{
 		Scissor = true;
@@ -44,50 +42,4 @@ Technique =
 			}
 		};
 	};
-};
-
-Technique =
-{
-	Language = "GLSL";
-	
-	Pass =
-	{
-		Scissor = true;
-
-		Vertex =
-		{
-			layout(location = 0) in vec3 bs_position;
-			layout(location = 1) in vec4 bs_color0;
-			
-			layout(location = 0) out vec4 color0;
-
-			out gl_PerVertex
-			{
-				vec4 gl_Position;
-			};
-			
-			layout(binding = 0, std140) uniform Uniforms
-			{
-				mat4 	gMatViewProj;
-				float	gAlphaCutoff;
-			};
-			
-			void main()
-			{
-				gl_Position = gMatViewProj * vec4(bs_position.xyz, 1);
-				color0 = bs_color0;
-			}
-		};
-		
-		Fragment =
-		{
-			layout(location = 0) in vec4 color0;
-			layout(location = 0) out vec4 fragColor;
-
-			void main()
-			{
-				fragColor = color0;
-			}
-		};
-	};
 };

+ 0 - 62
Data/Raw/Editor/Shaders/GizmoPickingAlpha.bsl

@@ -14,8 +14,6 @@ Blocks =
 
 Technique =
 {
-	Language = "HLSL11";
-	
 	Pass =
 	{
 		Scissor = true;
@@ -62,64 +60,4 @@ Technique =
 			}
 		};
 	};
-};
-
-Technique =
-{
-	Language = "GLSL";
-	
-	Pass =
-	{
-		Scissor = true;
-
-		Common =
-		{
-			layout(binding = 0, std140) uniform Uniforms
-			{
-				mat4 	gMatViewProj;
-				float	gAlphaCutoff;
-			};
-		};
-		
-		Vertex =
-		{
-			layout(location = 0) in vec3 bs_position;
-			layout(location = 1) in vec4 bs_color0;
-			layout(location = 2) in vec2 bs_texcoord0;
-			
-			layout(location = 0) out vec2 texcoord0;
-			layout(location = 1) out vec4 color0;
-
-			out gl_PerVertex
-			{
-				vec4 gl_Position;
-			};
-			
-			void main()
-			{
-				gl_Position = gMatViewProj * vec4(bs_position.xyz, 1);
-				texcoord0 = bs_texcoord0;
-				color0 = bs_color0;
-			}
-		};
-		
-		Fragment =
-		{
-			layout(location = 0) in vec2 texcoord0;
-			layout(location = 1) in vec4 color0;
-			
-			layout(location = 0) out vec4 fragColor;
-			
-			layout(binding = 1) uniform sampler2D gMainTexture;
-			
-			void main()
-			{
-				vec4 texColor = texture(gMainTexture, texcoord0);
-				if(texColor.a < gAlphaCutoff)
-					discard;
-				
-				fragColor = color0;
-			}
-		};
-	};
 };

+ 0 - 117
Data/Raw/Editor/Shaders/IconGizmo.bsl

@@ -14,8 +14,6 @@ Blocks =
 
 Technique =
 {
-	Language = "HLSL11";
-	
 	Pass =
 	{
 		Target = 
@@ -111,119 +109,4 @@ Technique =
 			}		
 		};
 	};	
-};	
-
-Technique =
-{
-	Language = "GLSL";
-	
-	Pass =
-	{
-		Target = 
-		{
-			Blend = true;
-			Color = { SRCA, SRCIA, ADD };
-		};
-		
-		DepthWrite = false;
-		CompareFunc = LTE;
-		
-		Vertex =
-		{
-			layout(location = 0) in vec3 bs_position;
-			layout(location = 1) in vec4 bs_color0;
-			layout(location = 2) in vec2 bs_texcoord0;
-			
-			layout(location = 0) out vec4 color0;
-			layout(location = 1) out vec2 texcoord0;
-
-			out gl_PerVertex
-			{
-				vec4 gl_Position;
-			};		
-		
-			layout(binding = 0, std140) uniform Uniforms
-			{
-				mat4 	gMatViewProj;
-				vec4	gViewDir;
-			};
-			
-			void main()
-			{
-				gl_Position = gMatViewProj * vec4(bs_position.xyz, 1);
-				texcoord0 = bs_texcoord0;
-				color0 = bs_color0;
-			}		
-		};
-		
-		Fragment =
-		{
-			layout(location = 0) in vec4 color0;
-			layout(location = 1) in vec2 texcoord0;
-			layout(location = 0) out vec4 fragColor;
-
-			layout(binding = 1) uniform sampler2D gMainTexture;
-			
-			void main()
-			{
-				vec4 texColor = texture(gMainTexture, texcoord0.st);
-				fragColor = color0 * texColor;
-			}		
-		};
-	};
-	
-	Pass =
-	{
-		Target = 
-		{
-			Blend = true;
-			Color = { SRCA, SRCIA, ADD };
-		};
-		
-		DepthWrite = false;
-		CompareFunc = GT;
-		
-		Vertex =
-		{
-			layout(location = 0) in vec3 bs_position;
-			layout(location = 1) in vec4 bs_color1;
-			layout(location = 2) in vec2 bs_texcoord0;
-			
-			layout(location = 0) out vec4 color0;
-			layout(location = 1) out vec2 texcoord0;
-
-			out gl_PerVertex
-			{
-				vec4 gl_Position;
-			};
-
-			layout(binding = 0, std140) uniform Uniforms
-			{
-				mat4 	gMatViewProj;
-				vec4	gViewDir;
-			};
-			
-			void main()
-			{
-				gl_Position = gMatViewProj * vec4(bs_position.xyz, 1);
-				texcoord0 = bs_texcoord0;
-				color0 = bs_color1;
-			}		
-		};
-		
-		Fragment =
-		{
-			layout(location = 0) in vec4 color0;
-			layout(location = 1) in vec2 texcoord0;
-			layout(location = 0) out vec4 fragColor;
-
-			layout(binding = 1) uniform sampler2D gMainTexture;
-			
-			void main()
-			{
-				vec4 texColor = texture(gMainTexture, texcoord0.st);
-				fragColor = color0 * texColor;
-			}		
-		};
-	};	
 };	

+ 0 - 19
Data/Raw/Editor/Shaders/LineGizmo.bsl

@@ -2,25 +2,6 @@
 
 Technique : inherits("LineGizmo") =
 {
-	Language = "HLSL11";
-	
-	Pass =
-	{
-		Multisample = false; // This controls line rendering algorithm
-		AALine = true;
-		
-		Target =
-		{
-			Blend = true;
-			Color = { SRCA, SRCIA, ADD };
-		};
-	};
-};
-
-Technique : inherits("LineGizmo") =
-{
-	Language = "GLSL";
-	
 	Pass =
 	{
 		Multisample = false; // This controls line rendering algorithm

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

@@ -2,8 +2,6 @@
 
 Technique : inherits("LineGizmo") =
 {
-	Language = "HLSL11";
-	
 	Pass =
 	{
 		DepthWrite = false;
@@ -19,25 +17,4 @@ Technique : inherits("LineGizmo") =
 			Color = { SRCA, SRCIA, ADD };
 		};
 	};
-};
-
-Technique : inherits("LineGizmo") =
-{
-	Language = "GLSL";
-	
-	Pass =
-	{
-		DepthWrite = false;
-		DepthRead = false;
-		Stencil = true;
-		StencilOpFront = { KEEP, KEEP, INC, PASS };
-		Multisample = false; // This controls line rendering algorithm
-		AALine = true;
-		
-		Target =
-		{
-			Blend = true;
-			Color = { SRCA, SRCIA, ADD };
-		};
-	};
-};
+};

+ 0 - 12
Data/Raw/Editor/Shaders/PickingAlphaCullCCW.bsl

@@ -2,18 +2,6 @@
 
 Technique : inherits("PickingAlphaCull") =
 {
-	Language = "HLSL11";
-	
-	Pass =
-	{
-		Cull = CCW;
-	};
-};
-
-Technique : inherits("PickingAlphaCull") =
-{
-	Language = "GLSL";
-	
 	Pass =
 	{
 		Cull = CCW;

+ 0 - 12
Data/Raw/Editor/Shaders/PickingAlphaCullCW.bsl

@@ -2,18 +2,6 @@
 
 Technique : inherits("PickingAlphaCull") =
 {
-	Language = "HLSL11";
-	
-	Pass =
-	{
-		Cull = CW;
-	};
-};
-
-Technique : inherits("PickingAlphaCull") =
-{
-	Language = "GLSL";
-	
 	Pass =
 	{
 		Cull = CW;

+ 0 - 12
Data/Raw/Editor/Shaders/PickingAlphaCullNone.bsl

@@ -2,18 +2,6 @@
 
 Technique : inherits("PickingAlphaCull") =
 {
-	Language = "HLSL11";
-	
-	Pass =
-	{
-		Cull = NOCULL;
-	};
-};
-
-Technique : inherits("PickingAlphaCull") =
-{
-	Language = "GLSL";
-	
 	Pass =
 	{
 		Cull = NOCULL;

+ 0 - 12
Data/Raw/Editor/Shaders/PickingCullCCW.bsl

@@ -2,18 +2,6 @@
 
 Technique : inherits("PickingCull") =
 {
-	Language = "HLSL11";
-	
-	Pass =
-	{
-		Cull = CCW;
-	};
-};
-
-Technique : inherits("PickingCull") =
-{
-	Language = "GLSL";
-	
 	Pass =
 	{
 		Cull = CCW;

+ 0 - 12
Data/Raw/Editor/Shaders/PickingCullCW.bsl

@@ -2,18 +2,6 @@
 
 Technique : inherits("PickingCull") =
 {
-	Language = "HLSL11";
-	
-	Pass =
-	{
-		Cull = CW;
-	};
-};
-
-Technique : inherits("PickingCull") =
-{
-	Language = "GLSL";
-	
 	Pass =
 	{
 		Cull = CW;

+ 0 - 12
Data/Raw/Editor/Shaders/PickingCullNone.bsl

@@ -2,18 +2,6 @@
 
 Technique : inherits("PickingCull") =
 {
-	Language = "HLSL11";
-	
-	Pass =
-	{
-		Cull = NOCULL;
-	};
-};
-
-Technique : inherits("PickingCull") =
-{
-	Language = "GLSL";
-	
 	Pass =
 	{
 		Cull = NOCULL;

+ 15 - 97
Data/Raw/Editor/Shaders/SceneGrid.bsl

@@ -14,8 +14,6 @@ Parameters =
 
 Technique =
 {
-	Language = "HLSL11";
-	
 	Pass =
 	{
 		DepthWrite = false;
@@ -30,7 +28,10 @@ Technique =
 
 		Vertex =
 		{
-			float4x4 matViewProj;
+			cbuffer VertParams
+			{	
+				float4x4 matViewProj;
+			};
 
 			void main(
 				in float3 inPos : POSITION,
@@ -44,13 +45,16 @@ Technique =
 		
 		Fragment =
 		{
-			float4 worldCameraPos;
-			float gridSpacing;
-			float gridBorderWidth;
-			float4 gridColor;
-			float gridFadeOutStart;
-			float gridFadeOutEnd;
-			float3 gridPlaneNormal; // Must be one of the basis vectors
+			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)
 			{
@@ -80,90 +84,4 @@ Technique =
 			}
 		};
 	};
-};
-
-Technique =
-{
-	Language = "GLSL";
-	
-	Pass =
-	{
-		DepthWrite = false;
-		Cull = NOCULL;
-		
-		Target =
-		{
-			Blend = true;
-			Color = { SRCA, SRCIA, ADD };
-			WriteMask = RGB;
-		};
-
-		Vertex =
-		{
-			layout(location = 0) in vec3 bs_position;
-			layout(location = 0) out vec3 worldPos;
-
-			out gl_PerVertex
-			{
-				vec4 gl_Position;
-			};
-		
-			layout(binding = 0) uniform VertUBO
-			{
-				mat4 matViewProj;
-			};
-			
-			void main()
-			{
-				vec4 outPos = matViewProj * vec4(bs_position.xyz, 1);
-				worldPos = bs_position;
-				gl_Position = outPos;
-			}
-		};
-		
-		Fragment =
-		{
-			layout(location = 0) in vec3 worldPos;
-			layout(location = 0) out vec4 fragColor;
-		
-			layout(binding = 1) uniform FragUBO
-			{
-				vec4 worldCameraPos;
-				float gridSpacing;
-				float gridBorderWidth;
-				vec4 gridColor;
-				float gridFadeOutStart;
-				float gridFadeOutEnd;
-				vec3 gridPlaneNormal; // Must be one of the basis vectors
-			};
-		
-			vec3 sampleGrid(vec3 position)
-			{
-				vec3 count = round(position / vec3(gridSpacing, gridSpacing, gridSpacing));
-				
-				// Adding grid plane normal ensures that the remainer for the unused axis is not zero, otherwise
-				// the sampled value would always be 1.
-				vec3 remainder = abs(position - count * vec3(gridSpacing, gridSpacing, gridSpacing)) + gridPlaneNormal;
-
-				vec3 derivX = dFdx(position);
-				vec3 derivY = dFdy(position);
-				vec3 gradientLength = vec3(length(vec2(derivX.x, derivY.x)), length(vec2(derivX.y, derivY.y)), length(vec2(derivX.z, derivY.z)));
-
-				vec3 vecBorderWidth = vec3(gridBorderWidth, gridBorderWidth, gridBorderWidth);
-				return 1.0f - smoothstep(vecBorderWidth, vecBorderWidth + gradientLength, remainder);
-			}
-
-			void main()
-			{
-				vec3 sampValue = sampleGrid(worldPos);
-
-				vec4 outColor = gridColor;
-				outColor.a = max(max(sampValue.x, sampValue.y), sampValue.z) * 
-					smoothstep(gridFadeOutEnd, gridFadeOutStart, length(worldPos - worldCameraPos.xyz));
-				
-				fragColor = outColor;
-			}
-		};
-	};
-};
-
+};

+ 1 - 33
Data/Raw/Editor/Shaders/Selection.bsl

@@ -12,54 +12,22 @@
 
 Technique 
  : inherits("Selection") =
-{
-	Language = "HLSL11";
-};
-
-Technique 
- : inherits("SelectionSkinned") =
-{
-	Language = "HLSL11";
-	Tags = { "Skinned" };
-};
-
-Technique 
- : inherits("SelectionMorph") =
-{
-	Language = "HLSL11";
-	Tags = { "Morph" };
-};
-
-Technique 
- : inherits("SelectionSkinnedMorph") =
-{
-	Language = "HLSL11";
-	Tags = { "SkinnedMorph" };
-};
-
-Technique 
- : inherits("Selection") =
-{
-	Language = "GLSL";
-};
+{ };
 
 Technique 
  : inherits("SelectionSkinned") =
 {
-	Language = "GLSL";
 	Tags = { "Skinned" };
 };
 
 Technique 
  : inherits("SelectionMorph") =
 {
-	Language = "GLSL";
 	Tags = { "Morph" };
 };
 
 Technique 
  : inherits("SelectionSkinnedMorph") =
 {
-	Language = "GLSL";
 	Tags = { "SkinnedMorph" };
 };

+ 1 - 8
Data/Raw/Editor/Shaders/SolidGizmo.bsl

@@ -1,11 +1,4 @@
 #include "$EDITOR$/SolidGizmo.bslinc"
 
 Technique : inherits("SolidGizmo") =
-{
-	Language = "HLSL11";
-};
-
-Technique : inherits("SolidGizmo") =
-{
-	Language = "GLSL";
-};
+{ };

+ 1 - 22
Data/Raw/Editor/Shaders/SolidHandle.bsl

@@ -3,8 +3,6 @@ Priority = 10;
 
 Technique : inherits("SolidGizmo") =
 {
-	Language = "HLSL11";
-	
 	Pass =
 	{
 		DepthWrite = false;
@@ -18,23 +16,4 @@ Technique : inherits("SolidGizmo") =
 			Color = { SRCA, SRCIA, ADD };
 		};
 	};
-};
-
-Technique : inherits("SolidGizmo") =
-{
-	Language = "GLSL";
-	
-	Pass =
-	{
-		DepthWrite = false;
-		DepthRead = false;
-		Stencil = true;
-		StencilOpFront = { KEEP, KEEP, INC, PASS };
-		
-		Target =
-		{
-			Blend = true;
-			Color = { SRCA, SRCIA, ADD };
-		};
-	};
-};
+};

+ 1 - 62
Data/Raw/Editor/Shaders/TextGizmo.bsl

@@ -14,8 +14,6 @@ Blocks =
 
 Technique =
 {
-	Language = "HLSL11";
-	
 	Pass =
 	{
 		Target = 
@@ -62,63 +60,4 @@ Technique =
 			}		
 		};
 	};
-};	
-
-Technique =
-{
-	Language = "GLSL";
-	
-	Pass =
-	{
-		Target = 
-		{
-			Blend = true;
-			Color = { SRCA, SRCIA, ADD };
-		};
-		
-		DepthWrite = false;
-		
-		Vertex =
-		{
-			layout(location = 0) in vec3 bs_position;
-			layout(location = 1) in vec4 bs_color0;
-			layout(location = 2) in vec2 bs_texcoord0;
-			
-			layout(location = 0) out vec4 color0;
-			layout(location = 1) out vec2 texcoord0;
-
-			out gl_PerVertex
-			{
-				vec4 gl_Position;
-			};		
-		
-			layout(binding = 0, std140) uniform Uniforms
-			{
-				mat4 	gMatViewProj;
-				vec4	gViewDir;
-			};
-			
-			void main()
-			{
-				gl_Position = gMatViewProj * vec4(bs_position.xyz, 1);
-				texcoord0 = bs_texcoord0;
-				color0 = bs_color0;
-			}		
-		};
-		
-		Fragment =
-		{
-			layout(location = 0) in vec4 color0;
-			layout(location = 1) in vec2 texcoord0;
-			
-			layout(location = 0) out vec4 fragColor;
-
-			layout(binding = 1) uniform sampler2D gMainTexture;
-			
-			void main()
-			{
-				fragColor = vec4(color0.rgb, texture(gMainTexture, texcoord0.st).r * color0.a);
-			}		
-		};
-	};
-};	
+};

+ 1 - 48
Data/Raw/Editor/Shaders/WireGizmo.bsl

@@ -11,8 +11,6 @@ Blocks =
 
 Technique =
 {
-	Language = "HLSL11";
-	
 	Pass =
 	{
 		Fill = WIRE;
@@ -44,49 +42,4 @@ Technique =
 			}
 		};
 	};
-};
-
-Technique =
-{
-	Language = "GLSL";
-	
-	Pass =
-	{
-		Fill = WIRE;
-	
-		Vertex =
-		{
-			layout(location = 0) in vec3 bs_position;
-			layout(location = 1) in vec4 bs_color0;
-			layout(location = 0) out vec4 color0;
-
-			out gl_PerVertex
-			{
-				vec4 gl_Position;
-			};		
-		
-			layout(binding = 0, std140) uniform Uniforms
-			{
-				mat4 	gMatViewProj;
-				vec4	gViewDir;
-			};
-			
-			void main()
-			{
-				gl_Position = gMatViewProj * vec4(bs_position.xyz, 1);
-				color0 = bs_color0;
-			}
-		};
-		
-		Fragment =
-		{
-			layout(location = 0) in vec4 color0;
-			layout(location = 0) out vec4 fragColor;
-
-			void main()
-			{
-				fragColor = color0;
-			}
-		};
-	};
-};
+};