WinRT: removed now-unused 'color' parameter from shaders
authorDavid Ludwig <dludwig@pobox.com>
Wed, 21 Nov 2012 17:19:16 -0500
changeset 8348 7cdcd6d28c85
parent 8347 f0e61c2638ad
child 8349 020b8b65bcfc
WinRT: removed now-unused 'color' parameter from shaders
src/video/windowsrt/SDL_winrtrenderer.cpp
src/video/windowsrt/SDL_winrtrenderer.h
src/video/windowsrt/SimplePixelShader.hlsl
src/video/windowsrt/SimpleVertexShader.hlsl
--- a/src/video/windowsrt/SDL_winrtrenderer.cpp	Wed Nov 21 17:07:48 2012 -0500
+++ b/src/video/windowsrt/SDL_winrtrenderer.cpp	Wed Nov 21 17:19:16 2012 -0500
@@ -32,8 +32,7 @@
 		const D3D11_INPUT_ELEMENT_DESC vertexDesc[] = 
 		{
 			{ "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0,  D3D11_INPUT_PER_VERTEX_DATA, 0 },
-			{ "COLOR",    0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0 },
-			{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 24, D3D11_INPUT_PER_VERTEX_DATA, 0 },
+			{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0 },
 		};
 
 		DX::ThrowIfFailed(
@@ -61,10 +60,10 @@
 	auto createCubeTask = (createPSTask && createVSTask).then([this] () {
 		VertexPositionColor cubeVertices[] = 
 		{
-			{XMFLOAT3(-1.0f, -1.0f, 0.0f), XMFLOAT3(1.0f, 0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f)},
-			{XMFLOAT3(-1.0f, 1.0f, 0.0f), XMFLOAT3(0.0f, 1.0f, 0.0f), XMFLOAT2(0.0f, 1.0f)},
-			{XMFLOAT3(1.0f, -1.0f, 0.0f), XMFLOAT3(0.0f, 0.0f, 1.0f), XMFLOAT2(1.0f, 0.0f)},
-			{XMFLOAT3(1.0f, 1.0f, 0.0f), XMFLOAT3(1.0f, 1.0f, 1.0f), XMFLOAT2(1.0f, 1.0f)},
+			{XMFLOAT3(-1.0f, -1.0f, 0.0f),  XMFLOAT2(0.0f, 0.0f)},
+			{XMFLOAT3(-1.0f, 1.0f, 0.0f), XMFLOAT2(0.0f, 1.0f)},
+			{XMFLOAT3(1.0f, -1.0f, 0.0f), XMFLOAT2(1.0f, 0.0f)},
+			{XMFLOAT3(1.0f, 1.0f, 0.0f), XMFLOAT2(1.0f, 1.0f)},
 		};
 
 		m_vertexCount = ARRAYSIZE(cubeVertices);
--- a/src/video/windowsrt/SDL_winrtrenderer.h	Wed Nov 21 17:07:48 2012 -0500
+++ b/src/video/windowsrt/SDL_winrtrenderer.h	Wed Nov 21 17:19:16 2012 -0500
@@ -5,7 +5,6 @@
 struct VertexPositionColor
 {
 	DirectX::XMFLOAT3 pos;
-	DirectX::XMFLOAT3 color;
 	DirectX::XMFLOAT2 tex;
 };
 
--- a/src/video/windowsrt/SimplePixelShader.hlsl	Wed Nov 21 17:07:48 2012 -0500
+++ b/src/video/windowsrt/SimplePixelShader.hlsl	Wed Nov 21 17:19:16 2012 -0500
@@ -4,7 +4,7 @@
 struct PixelShaderInput
 {
 	float4 pos : SV_POSITION;
-	float3 color : COLOR0;
+
 	float2 tex : TEXCOORD0;
 };
 
--- a/src/video/windowsrt/SimpleVertexShader.hlsl	Wed Nov 21 17:07:48 2012 -0500
+++ b/src/video/windowsrt/SimpleVertexShader.hlsl	Wed Nov 21 17:19:16 2012 -0500
@@ -4,14 +4,12 @@
 struct VertexShaderInput
 {
 	float3 pos : POSITION;
-	float3 color : COLOR0;
 	float2 tex : TEXCOORD0;
 };
 
 struct VertexShaderOutput
 {
 	float4 pos : SV_POSITION;
-	float3 color : COLOR0;
 	float2 tex : TEXCOORD0;
 };
 
@@ -19,7 +17,6 @@
 {
 	VertexShaderOutput output;
 	output.pos = float4(input.pos, 1.0f);
-	output.color = input.color;
 	output.tex = input.tex;
 	return output;
 }