MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/FleX / setLightMatrices

Method setLightMatrices

demo/d3d11/shadowMap.cpp:149–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149void ShadowMap::setLightMatrices(FXMVECTOR eye, FXMVECTOR lookAt, FXMVECTOR up, float sizeX, float sizeY, float zNear, float zFar)
150{
151 m_lightView = XMMatrixLookAtLH(eye, lookAt, up);
152
153 m_lightProjection = XMMatrixOrthographicLH(sizeX, sizeY, zNear, zFar);
154
155 DirectX::XMMATRIX clip2Tex(0.5, 0, 0, 0,
156 0, -0.5, 0, 0,
157 0, 0, 1, 0,
158 0.5, 0.5, 0, 1);
159
160 DirectX::XMMATRIX viewProjection = m_lightView * m_lightProjection;
161 m_lightWorldToTex = viewProjection * clip2Tex;
162}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected