MONKEYYYY

This commit is contained in:
2024-09-26 21:55:33 +02:00
parent 002edb6651
commit 1e6ea97fd0
4 changed files with 25 additions and 3 deletions

View File

@@ -372,6 +372,9 @@ bool CelShadingShader::SetShaderParameters(ID3D11DeviceContext* deviceContext, X
dataPtr2->diffuseColor = diffuseColor;
dataPtr2->lightDirection = lightDirection;
dataPtr2->lightPosition = lightPosition;
dataPtr2->constantAttenuation = 0.5f; // Set your attenuation values here
dataPtr2->linearAttenuation = 0.1f;
dataPtr2->quadraticAttenuation = 0.01f;
// Unlock the constant buffer.
deviceContext->Unmap(m_lightBuffer, 0);
@@ -389,6 +392,7 @@ bool CelShadingShader::SetShaderParameters(ID3D11DeviceContext* deviceContext, X
}
void CelShadingShader::RenderShader(ID3D11DeviceContext* deviceContext, int indexCount)
{
// Set the vertex input layout.