WinRT: moved the default vertex shader into the Direct3D 11.1 renderer's folder
authorDavid Ludwig <dludwig@pobox.com>
Sun, 24 Feb 2013 10:11:58 -0500
changeset 8444 dc12c4eda7e3
parent 8443 210a3869a783
child 8445 b38ff6d1f2a6
WinRT: moved the default vertex shader into the Direct3D 11.1 renderer's folder
VisualC-WinPhone/SDL/SDL_VS2012-WinPhone.vcxproj
VisualC-WinPhone/SDL/SDL_VS2012-WinPhone.vcxproj.filters
VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj
VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj.filters
src/render/direct3d11/SDL_D3D11_VertexShader_Default.hlsl
src/render/direct3d11/SDL_render_d3d11.cpp
src/video/windowsrt/SimpleVertexShader.hlsl
--- a/VisualC-WinPhone/SDL/SDL_VS2012-WinPhone.vcxproj	Sun Feb 24 10:02:57 2013 -0500
+++ b/VisualC-WinPhone/SDL/SDL_VS2012-WinPhone.vcxproj	Sun Feb 24 10:11:58 2013 -0500
@@ -388,8 +388,7 @@
       <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Pixel</ShaderType>
       <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Pixel</ShaderType>
     </FxCompile>
-    <FxCompile Include="..\..\src\video\windowsrt\SimpleVertexShader.hlsl">
-      <FileType>Document</FileType>
+    <FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_VertexShader_Default.hlsl">
       <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Vertex</ShaderType>
       <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Vertex</ShaderType>
       <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Vertex</ShaderType>
--- a/VisualC-WinPhone/SDL/SDL_VS2012-WinPhone.vcxproj.filters	Sun Feb 24 10:02:57 2013 -0500
+++ b/VisualC-WinPhone/SDL/SDL_VS2012-WinPhone.vcxproj.filters	Sun Feb 24 10:11:58 2013 -0500
@@ -592,14 +592,14 @@
     </ClCompile>
   </ItemGroup>
   <ItemGroup>
-    <FxCompile Include="..\..\src\video\windowsrt\SimpleVertexShader.hlsl">
-      <Filter>GPU Shaders</Filter>
-    </FxCompile>
     <FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_PixelShader_TextureCopy.hlsl">
       <Filter>GPU Shaders</Filter>
     </FxCompile>
     <FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_PixelShader_FixedColor.hlsl">
       <Filter>GPU Shaders</Filter>
     </FxCompile>
+    <FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_VertexShader_Default.hlsl">
+      <Filter>GPU Shaders</Filter>
+    </FxCompile>
   </ItemGroup>
 </Project>
\ No newline at end of file
--- a/VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj	Sun Feb 24 10:02:57 2013 -0500
+++ b/VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj	Sun Feb 24 10:11:58 2013 -0500
@@ -295,11 +295,10 @@
       <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Pixel</ShaderType>
       <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Pixel</ShaderType>
     </FxCompile>
-    <FxCompile Include="..\..\src\video\windowsrt\SimpleVertexShader.hlsl">
-      <FileType>Document</FileType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Vertex</ShaderType>
+    <FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_VertexShader_Default.hlsl">
       <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Vertex</ShaderType>
       <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Vertex</ShaderType>
+      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Vertex</ShaderType>
       <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Vertex</ShaderType>
       <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Vertex</ShaderType>
       <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Vertex</ShaderType>
--- a/VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj.filters	Sun Feb 24 10:02:57 2013 -0500
+++ b/VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj.filters	Sun Feb 24 10:11:58 2013 -0500
@@ -1,15 +1,15 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup>
-    <FxCompile Include="..\..\src\video\windowsrt\SimpleVertexShader.hlsl">
-      <Filter>GPU Shaders</Filter>
-    </FxCompile>
     <FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_PixelShader_TextureCopy.hlsl">
       <Filter>GPU Shaders</Filter>
     </FxCompile>
     <FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_PixelShader_FixedColor.hlsl">
       <Filter>GPU Shaders</Filter>
     </FxCompile>
+    <FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_VertexShader_Default.hlsl">
+      <Filter>GPU Shaders</Filter>
+    </FxCompile>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="..\..\src\SDL.c">
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/render/direct3d11/SDL_D3D11_VertexShader_Default.hlsl	Sun Feb 24 10:11:58 2013 -0500
@@ -0,0 +1,39 @@
+
+#pragma pack_matrix( row_major )
+
+cbuffer SDL_VertexShaderConstants : register(b0)
+{
+	matrix view;
+	matrix projection;
+};
+
+struct VertexShaderInput
+{
+    float3 pos : POSITION;
+    float2 tex : TEXCOORD0;
+    float4 color : COLOR0;
+};
+
+struct VertexShaderOutput
+{
+    float4 pos : SV_POSITION;
+    float2 tex : TEXCOORD0;
+    float4 color : COLOR0;
+};
+
+VertexShaderOutput main(VertexShaderInput input)
+{
+    VertexShaderOutput output;
+    float4 pos = float4(input.pos, 1.0f);
+
+    // Transform the vertex position into projected space.
+    pos = mul(pos, view);
+    pos = mul(pos, projection);
+    output.pos = pos;
+
+    // Pass through texture coordinates and color values without transformation
+    output.tex = input.tex;
+    output.color = input.color;
+
+    return output;
+}
--- a/src/render/direct3d11/SDL_render_d3d11.cpp	Sun Feb 24 10:02:57 2013 -0500
+++ b/src/render/direct3d11/SDL_render_d3d11.cpp	Sun Feb 24 10:11:58 2013 -0500
@@ -345,7 +345,7 @@
     // Load in SDL's one and only vertex shader:
     //
     vector<char> fileData;
-    if (!D3D11_ReadShaderContents(L"SimpleVertexShader.cso", fileData)) {
+    if (!D3D11_ReadShaderContents(L"SDL_D3D11_VertexShader_Default.cso", fileData)) {
         SDL_SetError("Unable to open SDL's vertex shader file.");
         return E_FAIL;
     }
--- a/src/video/windowsrt/SimpleVertexShader.hlsl	Sun Feb 24 10:02:57 2013 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-
-#pragma pack_matrix( row_major )
-
-cbuffer SDL_VertexShaderConstants : register(b0)
-{
-	matrix view;
-	matrix projection;
-};
-
-struct VertexShaderInput
-{
-    float3 pos : POSITION;
-    float2 tex : TEXCOORD0;
-    float4 color : COLOR0;
-};
-
-struct VertexShaderOutput
-{
-    float4 pos : SV_POSITION;
-    float2 tex : TEXCOORD0;
-    float4 color : COLOR0;
-};
-
-VertexShaderOutput main(VertexShaderInput input)
-{
-    VertexShaderOutput output;
-    float4 pos = float4(input.pos, 1.0f);
-
-    // Transform the vertex position into projected space.
-    pos = mul(pos, view);
-    pos = mul(pos, projection);
-    output.pos = pos;
-
-    // Pass through texture coordinates and color values without transformation
-    output.tex = input.tex;
-    output.color = input.color;
-
-    return output;
-}