Fuck yeah, spotLight effect also rocking. I've added a new model to my batch, a simple, 4 vertex plane. I was thinking this would be the perfect model to test the new spotlight effect however, this showed a side-effect of the per-vertex lighting with this kind of lighting, because of the 4 vertex-only nature of the model, if the 4 vertex are not inside the light cone it goes completly dark. It's pretty obvious, because the calculations are going to be made only on the vertexes.
I think i'm stopping pasting the code blocks here and just giving the link to zip file with all the shaders and scripts, i'm not explaining the code anyways (if you want a really cool explanation of the code, go to the excellent
cg tutorial free e-book).
Here are some cool pics



No comments:
Post a Comment