From 0cb569fdb744faa693c0870ce13157b12da04020 Mon Sep 17 00:00:00 2001 From: lanariel Date: Mon, 17 Feb 2014 13:05:35 +0100 Subject: [PATCH] Color is now Float4 with RGBA --- .../GameClientState/Buttons/ButtonEllipse.h | 8 ++++---- .../GameClientState/Buttons/ButtonRectangle.h | 8 ++++---- .../GameClientState/Buttons/EventButtonGUI.h | 14 +++++++------- .../GameClient/GameClientState/Buttons/TextField.h | 4 ++-- .../GameClient/GameClientState/LanMenuState.cpp | 6 +++--- .../GameClient/GameClientState/LobbyAdminState.cpp | 2 +- .../Game/GameClient/GameClientState/LobbyState.cpp | 2 +- Code/Game/GameClient/GameClientState/MainState.cpp | 6 +++--- Code/OysterGraphics/DllInterfaces/GFXAPI.cpp | 4 ++-- Code/OysterGraphics/DllInterfaces/GFXAPI.h | 4 ++-- Code/OysterGraphics/Render/GuiRenderer.cpp | 8 ++++---- Code/OysterGraphics/Render/GuiRenderer.h | 4 ++-- Code/OysterGraphics/Shader/Passes/2D/2DPixel.hlsl | 2 +- Code/OysterGraphics/Shader/Passes/2D/Header.hlsli | 2 +- 14 files changed, 37 insertions(+), 37 deletions(-) diff --git a/Code/Game/GameClient/GameClientState/Buttons/ButtonEllipse.h b/Code/Game/GameClient/GameClientState/Buttons/ButtonEllipse.h index 694683e7..7d9a9a5d 100644 --- a/Code/Game/GameClient/GameClientState/Buttons/ButtonEllipse.h +++ b/Code/Game/GameClient/GameClientState/Buttons/ButtonEllipse.h @@ -21,19 +21,19 @@ namespace DanBias ButtonEllipse() : EventButtonGUI(), radius(0) {} - ButtonEllipse(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, Owner owner, Oyster::Math::Float3 pos, + ButtonEllipse(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float4 textColor, Owner owner, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) : EventButtonGUI(textureName, buttonText, textColor, owner, pos, size, resize) {} - ButtonEllipse(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Oyster::Math::Float3 pos, + ButtonEllipse(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float4 textColor, EventFunc func, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) : EventButtonGUI(textureName, buttonText, textColor, func, pos, size, resize) {} - ButtonEllipse(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Owner owner, Oyster::Math::Float3 pos, + ButtonEllipse(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float4 textColor, EventFunc func, Owner owner, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) : EventButtonGUI(textureName, buttonText, textColor, func, owner, pos, size, resize) {} - ButtonEllipse(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Owner owner, void* userData, Oyster::Math::Float3 pos, + ButtonEllipse(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float4 textColor, EventFunc func, Owner owner, void* userData, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) : EventButtonGUI(textureName, buttonText, textColor, func, owner, userData, pos, size, resize) {} diff --git a/Code/Game/GameClient/GameClientState/Buttons/ButtonRectangle.h b/Code/Game/GameClient/GameClientState/Buttons/ButtonRectangle.h index 6afb77c1..f4dd69e1 100644 --- a/Code/Game/GameClient/GameClientState/Buttons/ButtonRectangle.h +++ b/Code/Game/GameClient/GameClientState/Buttons/ButtonRectangle.h @@ -21,19 +21,19 @@ namespace DanBias ButtonRectangle() : EventButtonGUI(), width(0), height(0) {} - ButtonRectangle(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, Owner owner, Oyster::Math::Float3 pos, + ButtonRectangle(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float4 textColor, Owner owner, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) : EventButtonGUI(textureName, buttonText, textColor, owner, pos, size, resize) {} - ButtonRectangle(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Oyster::Math::Float3 pos, + ButtonRectangle(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float4 textColor, EventFunc func, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) : EventButtonGUI(textureName, buttonText, textColor, func, pos, size, resize) {} - ButtonRectangle(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Owner owner, Oyster::Math::Float3 pos, + ButtonRectangle(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float4 textColor, EventFunc func, Owner owner, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) : EventButtonGUI(textureName, buttonText, textColor, func, owner, pos, size, resize) {} - ButtonRectangle(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Owner owner, void* userData, Oyster::Math::Float3 pos, + ButtonRectangle(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float4 textColor, EventFunc func, Owner owner, void* userData, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) : EventButtonGUI(textureName, buttonText, textColor, func, owner, userData, pos, size, resize) {} diff --git a/Code/Game/GameClient/GameClientState/Buttons/EventButtonGUI.h b/Code/Game/GameClient/GameClientState/Buttons/EventButtonGUI.h index 04af2e5a..c6b54a7e 100644 --- a/Code/Game/GameClient/GameClientState/Buttons/EventButtonGUI.h +++ b/Code/Game/GameClient/GameClientState/Buttons/EventButtonGUI.h @@ -31,30 +31,30 @@ namespace DanBias { public: EventButtonGUI() - : EventButton(), pos(0, 0), size(0, 0), texture(NULL), buttonText(""), textColor(0, 0, 0) + : EventButton(), pos(0, 0), size(0, 0), texture(NULL), buttonText(""), textColor(1, 1, 1, 1) {} - EventButtonGUI(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, Owner owner, Oyster::Math::Float3 pos, + EventButtonGUI(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float4 textColor, Owner owner, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) : EventButton(owner), pos(pos), size(size), texture(NULL), buttonText(buttonText), textColor(textColor) { CreateTexture(textureName); if(resize != ResizeAspectRatio_None) ResizeWithAspectRatio(resize); } - EventButtonGUI(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Oyster::Math::Float3 pos, + EventButtonGUI(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float4 textColor, EventFunc func, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) : EventButton(func), pos(pos), size(size), texture(NULL), buttonText(buttonText), textColor(textColor) { CreateTexture(textureName); if(resize != ResizeAspectRatio_None) ResizeWithAspectRatio(resize); } - EventButtonGUI(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Owner owner, Oyster::Math::Float3 pos, + EventButtonGUI(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float4 textColor, EventFunc func, Owner owner, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) : EventButton(func, owner), pos(pos), size(size), texture(NULL), buttonText(buttonText), textColor(textColor) { CreateTexture(textureName); if(resize != ResizeAspectRatio_None) ResizeWithAspectRatio(resize); } - EventButtonGUI(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Owner owner, void* userData, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) + EventButtonGUI(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float4 textColor, EventFunc func, Owner owner, void* userData, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) : EventButton(func, owner, userData), pos(pos), size(size), texture(NULL), buttonText(buttonText), textColor(textColor) { CreateTexture(textureName); @@ -77,7 +77,7 @@ namespace DanBias if(EventButton::Enabled()) { // let the using dev decide what is rendered - Oyster::Graphics::API::RenderGuiElement(texture, pos, size, Oyster::Math::Float3(1.0f, 1.0f, 1.0f)); + Oyster::Graphics::API::RenderGuiElement(texture, pos, size, Oyster::Math::Float4(1.0f, 1.0f, 1.0f, 1.0f)); //Render att xPos and yPos //With width and height @@ -125,7 +125,7 @@ namespace DanBias Oyster::Graphics::API::Texture texture; std::wstring buttonText; - Oyster::Math::Float3 textColor; + Oyster::Math::Float4 textColor; }; } } diff --git a/Code/Game/GameClient/GameClientState/Buttons/TextField.h b/Code/Game/GameClient/GameClientState/Buttons/TextField.h index af9c4346..c1fa79ac 100644 --- a/Code/Game/GameClient/GameClientState/Buttons/TextField.h +++ b/Code/Game/GameClient/GameClientState/Buttons/TextField.h @@ -20,7 +20,7 @@ namespace DanBias { namespace Client { public: TextField(); - TextField( ::std::wstring backgroundTexture, ::Oyster::Math::Float3 textColor, Owner owner, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height ); + TextField( ::std::wstring backgroundTexture, ::Oyster::Math::Float4 textColor, Owner owner, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height ); virtual ~TextField(); virtual void RenderText(); @@ -62,7 +62,7 @@ namespace DanBias { namespace Client } template - TextField::TextField( ::std::wstring backgroundTexture, ::Oyster::Math::Float3 textColor, Owner owner, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize ) + TextField::TextField( ::std::wstring backgroundTexture, ::Oyster::Math::Float4 textColor, Owner owner, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize ) : ButtonRectangle( backgroundTexture, L"", textColor, owner, pos, size, resize ) { this->fontHeight = 0.025f; diff --git a/Code/Game/GameClient/GameClientState/LanMenuState.cpp b/Code/Game/GameClient/GameClientState/LanMenuState.cpp index 7faf5d55..3051c097 100644 --- a/Code/Game/GameClient/GameClientState/LanMenuState.cpp +++ b/Code/Game/GameClient/GameClientState/LanMenuState.cpp @@ -58,7 +58,7 @@ bool LanMenuState::Init( SharedStateContent &shared ) this->privData->background = Graphics::API::CreateTexture( L"grass_md.png" ); // create guiElements - this->privData->connectIP = new TextField( L"earth_md.png", Float3(1.0f), this, Float3(0.5f, 0.3f, 0.5f), Float2(0.8f, 0.09f), ResizeAspectRatio_None ); + this->privData->connectIP = new TextField( L"earth_md.png", Float4(1.0f), this, Float3(0.5f, 0.3f, 0.5f), Float2(0.8f, 0.09f), ResizeAspectRatio_None ); this->privData->connectIP->ReserveLines( 1 ); this->privData->connectIP->AppendText( L"127.0.0.1" ); this->privData->connectIP->SetFontHeight( 0.08f ); @@ -68,10 +68,10 @@ bool LanMenuState::Init( SharedStateContent &shared ) this->privData->guiElements.AddButton( this->privData->connectIP ); ButtonRectangle *guiElements; - guiElements = new ButtonRectangle( L"earth_md.png", L"Connect", Float3(1.0f), OnButtonInteract_Connect, this, Float3(0.5f, 0.4f, 0.5f), Float2(0.3f, 0.05f), ResizeAspectRatio_None ); + guiElements = new ButtonRectangle( L"earth_md.png", L"Connect", Float4(1.0f), OnButtonInteract_Connect, this, Float3(0.5f, 0.4f, 0.5f), Float2(0.3f, 0.05f), ResizeAspectRatio_None ); this->privData->guiElements.AddButton( guiElements ); - guiElements = new ButtonRectangle( L"earth_md.png", L"Exit", Float3(1.0f), OnButtonInteract_Exit, this, Float3(0.5f, 0.5f, 0.5f), Float2(0.3f, 0.05f), ResizeAspectRatio_None ); + guiElements = new ButtonRectangle( L"earth_md.png", L"Exit", Float4(1.0f), OnButtonInteract_Exit, this, Float3(0.5f, 0.5f, 0.5f), Float2(0.3f, 0.05f), ResizeAspectRatio_None ); this->privData->guiElements.AddButton( guiElements ); // bind guiElements collection to the singleton eventhandler diff --git a/Code/Game/GameClient/GameClientState/LobbyAdminState.cpp b/Code/Game/GameClient/GameClientState/LobbyAdminState.cpp index 6cc1f15f..b05e90dc 100644 --- a/Code/Game/GameClient/GameClientState/LobbyAdminState.cpp +++ b/Code/Game/GameClient/GameClientState/LobbyAdminState.cpp @@ -50,7 +50,7 @@ bool LobbyAdminState::Init( SharedStateContent &shared ) // create buttons ButtonRectangle *button; - button = new ButtonRectangle( L"earth_md.png", L"Ready", Float3(1.0f), OnButtonInteract_Ready, this, Float3(0.5f, 0.2f, 0.5f), Float2(0.3f, 0.1f), ResizeAspectRatio_Width ); + button = new ButtonRectangle( L"earth_md.png", L"Ready", Float4(1.0f), OnButtonInteract_Ready, this, Float3(0.5f, 0.2f, 0.5f), Float2(0.3f, 0.1f), ResizeAspectRatio_Width ); this->privData->guiElements.AddButton( button ); // bind button collection to the singleton eventhandler diff --git a/Code/Game/GameClient/GameClientState/LobbyState.cpp b/Code/Game/GameClient/GameClientState/LobbyState.cpp index 6c5b2606..23b27e3f 100644 --- a/Code/Game/GameClient/GameClientState/LobbyState.cpp +++ b/Code/Game/GameClient/GameClientState/LobbyState.cpp @@ -50,7 +50,7 @@ bool LobbyState::Init( SharedStateContent &shared ) // create buttons ButtonRectangle *button; - button = new ButtonRectangle( L"earth_md.png", L"Ready", Float3(1.0f), OnButtonInteract_Ready, this, Float3(0.5f, 0.2f, 0.5f), Float2(0.3f, 0.1f), ResizeAspectRatio_Width ); + button = new ButtonRectangle( L"earth_md.png", L"Ready", Float4(1.0f), OnButtonInteract_Ready, this, Float3(0.5f, 0.2f, 0.5f), Float2(0.3f, 0.1f), ResizeAspectRatio_Width ); this->privData->guiElements.AddButton( button ); // bind button collection to the singleton eventhandler diff --git a/Code/Game/GameClient/GameClientState/MainState.cpp b/Code/Game/GameClient/GameClientState/MainState.cpp index 1fd1d813..d71b050e 100644 --- a/Code/Game/GameClient/GameClientState/MainState.cpp +++ b/Code/Game/GameClient/GameClientState/MainState.cpp @@ -54,13 +54,13 @@ bool MainState::Init( SharedStateContent &shared ) // create buttons ButtonRectangle *button; - button = new ButtonRectangle( L"earth_md.png", L"Create", Float3(1.0f), OnButtonInteract_Create, this, Float3(0.5f, 0.2f, 0.5f), Float2(0.3f, 0.1f), ResizeAspectRatio_Width ); + button = new ButtonRectangle( L"earth_md.png", L"Create", Float4(1.0f), OnButtonInteract_Create, this, Float3(0.5f, 0.2f, 0.5f), Float2(0.3f, 0.1f), ResizeAspectRatio_Width ); this->privData->guiElements.AddButton( button ); - button = new ButtonRectangle( L"skysphere_md.png", L"Join", Float3(1.0f), OnButtonInteract_Join, this, Float3(0.5f, 0.4f, 0.5f), Float2(0.3f, 0.1f), ResizeAspectRatio_Width ); + button = new ButtonRectangle( L"skysphere_md.png", L"Join", Float4(1.0f), OnButtonInteract_Join, this, Float3(0.5f, 0.4f, 0.5f), Float2(0.3f, 0.1f), ResizeAspectRatio_Width ); this->privData->guiElements.AddButton( button ); - button = new ButtonRectangle( L"plane_texture_md.png", L"Quit", Float3(1.0f), OnButtonInteract_Quit, this, Float3(0.5f, 0.8f, 0.5f), Float2(0.3f, 0.1f), ResizeAspectRatio_Width ); + button = new ButtonRectangle( L"plane_texture_md.png", L"Quit", Float4(1.0f), OnButtonInteract_Quit, this, Float3(0.5f, 0.8f, 0.5f), Float2(0.3f, 0.1f), ResizeAspectRatio_Width ); this->privData->guiElements.AddButton( button ); // bind button collection to the singleton eventhandler diff --git a/Code/OysterGraphics/DllInterfaces/GFXAPI.cpp b/Code/OysterGraphics/DllInterfaces/GFXAPI.cpp index f3bd12fd..f4ce303f 100644 --- a/Code/OysterGraphics/DllInterfaces/GFXAPI.cpp +++ b/Code/OysterGraphics/DllInterfaces/GFXAPI.cpp @@ -161,7 +161,7 @@ namespace Oyster Render::Gui::Begin2DRender(); } - void API::RenderGuiElement(API::Texture tex, Math::Float3 pos, Math::Float2 size, Math::Float3 color) + void API::RenderGuiElement(API::Texture tex, Math::Float3 pos, Math::Float2 size, Math::Float4 color) { Render::Gui::Render((ID3D11ShaderResourceView*)tex,pos,size,color); } @@ -196,7 +196,7 @@ namespace Oyster Render::Gui::Begin2DTextRender(); } - void API::RenderText(std::wstring text, Math::Float3 Pos, Math::Float2 Size, float FontSize, Math::Float3 color) + void API::RenderText(std::wstring text, Math::Float3 Pos, Math::Float2 Size, float FontSize, Math::Float4 color) { Render::Gui::RenderText(text, Pos, Size, FontSize, color); } diff --git a/Code/OysterGraphics/DllInterfaces/GFXAPI.h b/Code/OysterGraphics/DllInterfaces/GFXAPI.h index e2cea318..eea53939 100644 --- a/Code/OysterGraphics/DllInterfaces/GFXAPI.h +++ b/Code/OysterGraphics/DllInterfaces/GFXAPI.h @@ -57,13 +57,13 @@ namespace Oyster static void StartGuiRender(); //! @brief Renders a single GUI element using the texture provided and the Pos in the center, %based system - static void RenderGuiElement(Texture, Math::Float3 Pos, Math::Float2 Size, Math::Float3 Color = Math::Float3(1,1,1)); + static void RenderGuiElement(Texture, Math::Float3 Pos, Math::Float2 Size, Math::Float4 Color = Math::Float4(1,1,1,1)); //! @brief Configures Renderer to process 2D Text, data will be passed in to EndFrame() static void StartTextRender(); //! @brief Renders a single GUI string using the texture provided and the Pos in the center, %based system - static void RenderText(std::wstring, Math::Float3 Pos, Math::Float2 Size, float FontSize, Math::Float3 Color = Math::Float3(1,1,1)); + static void RenderText(std::wstring, Math::Float3 Pos, Math::Float2 Size, float FontSize, Math::Float4 Color = Math::Float4(1,1,1,1)); //! @brief Performs light calculations, post effects and presents the scene static void EndFrame(); diff --git a/Code/OysterGraphics/Render/GuiRenderer.cpp b/Code/OysterGraphics/Render/GuiRenderer.cpp index 8eda0bf5..b17fdfef 100644 --- a/Code/OysterGraphics/Render/GuiRenderer.cpp +++ b/Code/OysterGraphics/Render/GuiRenderer.cpp @@ -16,7 +16,7 @@ namespace Oyster Core::PipelineManager::SetRenderPass(Render::Resources::Gui::Pass); } - void Gui::Render(ID3D11ShaderResourceView* tex,Math::Float3 pos, Math::Float2 size, Math::Float3 color) + void Gui::Render(ID3D11ShaderResourceView* tex,Math::Float3 pos, Math::Float2 size, Math::Float4 color) { Core::deviceContext->PSSetShaderResources(0,1,&tex); @@ -37,7 +37,7 @@ namespace Oyster Render::Resources::Gui::Data.Unmap(); data = Render::Resources::Color.Map(); - memcpy(data,&color,sizeof(Math::Float3)); + memcpy(data,&color,sizeof(Math::Float4)); Render::Resources::Color.Unmap(); @@ -50,7 +50,7 @@ namespace Oyster Core::PipelineManager::SetRenderPass(Resources::Gui::Text::Pass); } - void Gui::RenderText(std::wstring text, Math::Float3 pos, Math::Float2 size, float FontSize, Math::Float3 color) + void Gui::RenderText(std::wstring text, Math::Float3 pos, Math::Float2 size, float FontSize, Math::Float4 color) { //size.x = size.x / (text.length() * TEXT_SPACING /2); @@ -81,7 +81,7 @@ namespace Oyster Definitions::Text2D tmpInst; data = Render::Resources::Color.Map(); - memcpy(data,&color,sizeof(Math::Float3)); + memcpy(data,&color,sizeof(Math::Float4)); Render::Resources::Color.Unmap(); void* dest = Resources::Gui::Text::Vertex.Map(); diff --git a/Code/OysterGraphics/Render/GuiRenderer.h b/Code/OysterGraphics/Render/GuiRenderer.h index 3e4a8de0..64d6fdd3 100644 --- a/Code/OysterGraphics/Render/GuiRenderer.h +++ b/Code/OysterGraphics/Render/GuiRenderer.h @@ -12,9 +12,9 @@ namespace Oyster { public: static void Begin2DRender(); - static void Render(ID3D11ShaderResourceView* tex, Math::Float3 pos, Math::Float2 size, Math::Float3 tint = Math::Float3(1,1,1)); + static void Render(ID3D11ShaderResourceView* tex, Math::Float3 pos, Math::Float2 size, Math::Float4 tint = Math::Float4(1,1,1,1)); static void Begin2DTextRender(); - static void RenderText(std::wstring text, Math::Float3 pos, Math::Float2 size, float FontSize, Math::Float3 tint = Math::Float3(1,1,1)); + static void RenderText(std::wstring text, Math::Float3 pos, Math::Float2 size, float FontSize, Math::Float4 tint = Math::Float4(1,1,1,1)); }; } } diff --git a/Code/OysterGraphics/Shader/Passes/2D/2DPixel.hlsl b/Code/OysterGraphics/Shader/Passes/2D/2DPixel.hlsl index c28fd642..0c8d3c68 100644 --- a/Code/OysterGraphics/Shader/Passes/2D/2DPixel.hlsl +++ b/Code/OysterGraphics/Shader/Passes/2D/2DPixel.hlsl @@ -2,5 +2,5 @@ float4 main(Pixel2DIn input) : SV_Target0 { - return Material.Sample(LinearSampler,input.Uv) * float4(Color,1); + return Material.Sample(LinearSampler,input.Uv) * Color; } \ No newline at end of file diff --git a/Code/OysterGraphics/Shader/Passes/2D/Header.hlsli b/Code/OysterGraphics/Shader/Passes/2D/Header.hlsli index 4b507644..f84483f5 100644 --- a/Code/OysterGraphics/Shader/Passes/2D/Header.hlsli +++ b/Code/OysterGraphics/Shader/Passes/2D/Header.hlsli @@ -10,7 +10,7 @@ cbuffer EveryObject2D : register(b0) cbuffer ColorData : register(b0) { - float3 Color; + float4 Color; }; struct Pixel2DIn