Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
WinRT: removed now-unused 'color' parameter from shaders
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLudwig committed Nov 21, 2012
1 parent 5f3fb43 commit 669e347
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
11 changes: 5 additions & 6 deletions src/video/windowsrt/SDL_winrtrenderer.cpp
Expand Up @@ -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(
Expand Down Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion src/video/windowsrt/SDL_winrtrenderer.h
Expand Up @@ -5,7 +5,6 @@
struct VertexPositionColor
{
DirectX::XMFLOAT3 pos;
DirectX::XMFLOAT3 color;
DirectX::XMFLOAT2 tex;
};

Expand Down
2 changes: 1 addition & 1 deletion src/video/windowsrt/SimplePixelShader.hlsl
Expand Up @@ -4,7 +4,7 @@ SamplerState theSampler : register(s0);
struct PixelShaderInput
{
float4 pos : SV_POSITION;
float3 color : COLOR0;

float2 tex : TEXCOORD0;
};

Expand Down
3 changes: 0 additions & 3 deletions src/video/windowsrt/SimpleVertexShader.hlsl
Expand Up @@ -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.