Shadow Mapping - I made it!

Blitz3D Forums/Blitz3D Programming/Shadow Mapping - I made it!

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Devils Child: The bad projection is when the light is not at the same position as the mesh with the cubemap. For dynamic cubemaps to look correct, the camera used to render the cubemap should be at the same position as the mesh that will recieve the cubemap, obviously the light moves around in the demo which causes an offset.

It might be possible to fix with some kind of offset texture matrix applied using a DLL, SetTransform(texLayer, D3DTRANSFORMSTATE_TEXTURE0+texLayer, matrixType).