[add] Initiali_Commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#include "pch.h"
|
||||
#include "Shadow.h"
|
||||
#include "Shader.h"
|
||||
|
||||
CShadow::CShadow()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
HRESULT CShadow::Ready_Shadow_Light(const SHADOW_LIGHT_DESC& Desc)
|
||||
{
|
||||
m_Desc = Desc;
|
||||
XMStoreFloat4x4(&m_TransformationMatrices[ENUM_CLASS(D3DTS::VIEW)],
|
||||
XMMatrixLookAtLH(XMLoadFloat4(&m_Desc.vEye), XMLoadFloat4(&m_Desc.vAt), XMVectorSet(0.f, 1.f, 0.f, 1.f)));
|
||||
|
||||
XMStoreFloat4x4(&m_TransformationMatrices[ENUM_CLASS(D3DTS::PROJ)],
|
||||
XMMatrixOrthographicLH(m_Desc.fWidth, m_Desc.fHeight, m_Desc.fNear, m_Desc.fFar));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CShadow::Bind_Shadow_Resource(CShader* pShader, const _char* pConstantName, D3DTS eType) const
|
||||
{
|
||||
return pShader->Bind_Matrix(pConstantName, &m_TransformationMatrices[ENUM_CLASS(eType)]);
|
||||
}
|
||||
|
||||
CShadow* CShadow::Create()
|
||||
{
|
||||
return new CShadow();
|
||||
}
|
||||
|
||||
|
||||
void CShadow::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
Reference in New Issue
Block a user