Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

WinRT: removed now-unused 'color' parameter from shaders

  • Loading branch information
DavidLudwig committed Nov 21, 2012
1 parent 5f3fb43 commit 669e347a2236e056b2aae7fcc64e922307eb45e7
@@ -32,8 +32,7 @@ void SDL_winrtrenderer::CreateDeviceResources()
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 @@ void SDL_winrtrenderer::CreateDeviceResources()
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);
@@ -5,7 +5,6 @@
struct VertexPositionColor
{
DirectX::XMFLOAT3 pos;
DirectX::XMFLOAT3 color;
DirectX::XMFLOAT2 tex;
};

@@ -4,7 +4,7 @@ SamplerState theSampler : register(s0);
struct PixelShaderInput
{
float4 pos : SV_POSITION;
float3 color : COLOR0;

float2 tex : TEXCOORD0;
};

@@ -4,22 +4,19 @@
struct VertexShaderInput
{
float3 pos : POSITION;
float3 color : COLOR0;
float2 tex : TEXCOORD0;
};

struct VertexShaderOutput
{
float4 pos : SV_POSITION;
float3 color : COLOR0;
float2 tex : TEXCOORD0;
};

VertexShaderOutput main(VertexShaderInput input)
{
VertexShaderOutput output;
output.pos = float4(input.pos, 1.0f);
output.color = input.color;
output.tex = input.tex;
return output;
}

0 comments on commit 669e347

Please sign in to comment.