@JulzMighty: I was the one that brought up that game/scene with the huge shadow on the wall. It was a PSP game called Death Jr. If this kind of huge shadow effect can be achieved without a shader, then that would be best, but I fear this may not be possible.

Quote:

Quote:

(...) The influence of a nearby dynamic light is the only chance to create interesting and realistic perspective stencil shadows in an indoor environment.




Maybe this isn't popular, because only ONE light entity casts such a shadow. If an entity could have more than one stencil shadow and the shadows are faded away depending on the lightsource intensity and distance to it, heck, I would use it more than very often.




I have some lines in my dynamic light function which will fade the shadow depending on distance from the light. The problem with it is that it will fade EVERY shadow because of the nature of stencil shadows. It also only works with one light only, but Error said there were possible ways to get around this. Search for the thread in Scripting. Here's the code...these two lines go before my dynamic light while loop:

Code:

my.skill11 = 100*pow(my.minDist,4)/(pow(my.maxDist,2)-pow(my.minDist,2)) + 100*pow(my.minDist,2);
my.skill12 = -100*pow(my.minDist,2)/(pow(my.maxDist,2)-pow(my.minDist,2));



This line will go somewhere near the end of the while loop:

Code:

mat_shadow.alpha = my.skill11 / (clamp(vec_dist(my.x,player.x), my.minDist, my.maxDist) * clamp(vec_dist(my.x, player.x),my.minDist,my.maxDist)) + my.skill12;



You'll need either a VAR or DEFINE for minDist and maxDist. These are the values that will determine the behavior of the fading. It's a bit tricky, and I don't fully understand it, yet it works find once I get the proper values for a level.


My User Contributions master list - my initial post links are down but scroll down page to find list to active links