Thanks for explaining that
Quote: "Which bit of the code exactly? "
Ah, they were in the DBP code. Maybe I should have said reciprocal instead

:
` create point light object
make object sphere 1, 5
set object light 1, 0
lightX# = -56.0 : lightY# = 200.0 : lightZ# = -50.0
position object 1, lightX#, lightY#, lightZ#
set vector4 4, lightX#, lightY#, lightZ#, 0.002 ` 4th entry is reciprocal of light range (500 units assumed)
set effect constant vector 1, "lightPos", 4
set effect constant vector 2, "lightPos", 4
lightProjScale# = 1.0/(400.0 - nearDist#) ` 400 is a guess at the max likely distance of a shadow from the light
set effect constant float 1, "lightProjScale", lightProjScale#
set effect constant float 2, "lightProjScale", lightProjScale#
I also found them in the FX file:
float shadowMapSize = 1024.0;
float filterWidth = 0.0009765625;// = 1.0/1024.0;
float4 lightPos = {0.0, 500.0, 0.0, 0.001}; // 4th entry is reciprocal of light range
float lightProjScale = 0.002; // reciprocal of max likely distance of shadow from light less nearDist (default 500 - 0)
The reasoning behind it is probably beyond me at this point though
@puppyss: If you have another question then I'll stop asking mine

Guns, cinematics, stealth, items and more!