Commit f763531d authored by chili's avatar chili
Browse files

fix PS constants stuff

parent 0b69ae86
...@@ -44,12 +44,6 @@ Box::Box( Graphics& gfx, ...@@ -44,12 +44,6 @@ Box::Box( Graphics& gfx,
AddStaticBind( std::make_unique<PixelShader>( gfx,L"PhongPS.cso" ) ); AddStaticBind( std::make_unique<PixelShader>( gfx,L"PhongPS.cso" ) );
AddStaticIndexBuffer( std::make_unique<IndexBuffer>( gfx,model.indices ) ); AddStaticIndexBuffer( std::make_unique<IndexBuffer>( gfx,model.indices ) );
struct PSLightConstants
{
dx::XMVECTOR pos;
};
AddStaticBind( std::make_unique<PixelConstantBuffer<PSLightConstants>>( gfx ) );
const std::vector<D3D11_INPUT_ELEMENT_DESC> ied = const std::vector<D3D11_INPUT_ELEMENT_DESC> ied =
{ {
......
...@@ -37,4 +37,5 @@ void PointLight::Draw( Graphics& gfx ) const noexcept(!IS_DEBUG) ...@@ -37,4 +37,5 @@ void PointLight::Draw( Graphics& gfx ) const noexcept(!IS_DEBUG)
void PointLight::Bind( Graphics& gfx ) const noexcept void PointLight::Bind( Graphics& gfx ) const noexcept
{ {
cbuf.Update( gfx,PointLightCBuf{ pos } ); cbuf.Update( gfx,PointLightCBuf{ pos } );
cbuf.Bind( gfx );
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment