T3D 1.1 Beta 3 - Incorrect shadow transform (+fix) - LOGGED
by Ivan Mandzhukov · in Torque 3D Professional · 11/30/2010 (4:39 pm) · 20 replies
Hi,
in BL the shadow is just a decal.
Currently if you try to rotate an object on the fly (c++) you will see wrong shadow results.
The problem is: lightning and shadow transforms usually work with non-rotated render-transforms.
In projectedShadow.cpp , locate :
And replace with:
in BL the shadow is just a decal.
Currently if you try to rotate an object on the fly (c++) you will see wrong shadow results.
The problem is: lightning and shadow transforms usually work with non-rotated render-transforms.
In projectedShadow.cpp , locate :
// Set up the decal position. // We use the object space box center // multiplied by the render transform // of the object to ensure we benefit // from interpolation. renderTransform.mulP( boxCenter );
And replace with:
// Set up the decal position. // We use the object space box center // multiplied by the render transform // of the object to ensure we benefit // from interpolation. MatrixF T = mParentObject->getRenderTransform(); Point3F up(0,0,1); T.setColumn(2,up); T.mulP( boxCenter );
Associate Tom Spilman
Sickhead Games