frustrum culling (camera inside shadow volume) ?
Blitz3D Forums/Blitz3D Programming/frustrum culling (camera inside shadow volume) ?
| ||
hello! in order to optimize our shadow system to about 1.5x speed i have to do it as follows: ![]() the object is a shpere which represents the bounding sphere of an entity (or box or what ever the algorithm supports)... i need to know whether the camera is inside the red area below the shadow caster. thank you :) |
| ||
I'm not sure if this works, I don't know how to test it. |
| ||
hey bram thx it works seamless! thank you. you helped me alot. i will release an update as soon as i finished this. cya!! |
| ||
one issue: this code is made for parrallel light, right? what if my lightsource is a pointlight? then it is making strange thigs... |
| ||
Yes, you are right, sorry. I forgot to include scale the radius# in IsInRedArea(). This might be better: Note that instead of using EntityDistance() you could also calculate the distance between two points yourself. It will save creating/destroying a pivot for each calculation. |
| ||
thank you :) |
| ||
no problem, Teufel! |