Thursday, April 14, 2011

Shaders.

More shaders. We discovered that Unity's builtin shaders do not cast or recieve shadows so we had to make something up that works ourselves.
As you can see in the picture unity's own transparent shader makes the blood recieve no shadow so when it is in a shadow it looks quite bad. Unity has a second shader group called transparent cutout and what it does is that it cuts all the pixels above a certain alpha out and renders them. There is no halftransparent pixels, either it is rendered or it is not. This gives a really sharp edge on everything and we also noticed weird delay when we were moving the camera around. As thou pixels from the previous frames were showing and it looked quite odd.
So i worked up a shader of our own that does exactly what we want, it does not render transparent pixels but it does render pixels with some transparency.

If you have any questions don't be afraid to comment.

0 comments:

Post a Comment