mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
lighting corrections:
1) fix spotlight shadow casting. we weren't properly accounting for reversedepthbuffer there 2) fix mismatched variables in forward lit spotlight param array 3) use disney diffuse in the generalized brdf, and apply it for spotlights after angular attenuation, not before 4) .provide a generailze luxTargMultiplier approach for spot and point lights (as well as future growth areas) so that range, angle ect can impact the brightness variable sent to a given light source shader without perpixel overhead 5) for spotlightParams in particular, use sizeof(point4f) for the alignedarray untill that's properly reviewed/revised 6) narrow attenuation slightly based on a given lights dot product to prevent tool vs outcome leakage, plus provide safeties for when a given spotslight's inner and outter angles match identially
This commit is contained in:
parent
917cb882e9
commit
593d0ef9f0
9 changed files with 117 additions and 78 deletions
|
|
@ -71,7 +71,8 @@ void SingleLightShadowMap::_render( RenderPassManager* renderPass,
|
|||
lightMatrix.inverse();
|
||||
GFX->setWorldMatrix(lightMatrix);
|
||||
|
||||
const MatrixF& lightProj = GFX->getProjectionMatrix();
|
||||
MatrixF lightProj = GFX->getProjectionMatrix();
|
||||
lightProj.reverseProjection();
|
||||
mWorldToLightProj = lightProj * lightMatrix;
|
||||
|
||||
// Render the shadowmap!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue