Spot on Texture

Blitz3D Forums/Blitz3D Programming/Spot on Texture

Once you have your shadow code working so that drawing at 0,0 is correct then you need to position it at 1,1.

I would add entity markers at both positions with the origin a different color than the corner (1,1) marker.

It should then simply be a matter of changing the multiplier to the TexturePosition to get the shadow at 1,1 at global coordinates 1,1.

PositionTexture offsetx#+multx#*globalx#,offsety#+multy#*globaly#

At a guess the multipliers will be something like 1.0/meshwidth(terrainmesh),1.0/meshheight(terrainmesh) for an unscaled terrainmesh model.