Decal / Transparent Shader is Bright in Shadow

I’m making decals to add details to the environment I’m working on, They are just a Transparent Diffuse Bump Shader on a simple plane. They don’t seem to receive shading properly though, so they appear bright in shadow. What am I doing wrong here?

chad

transparent queue shaders are not affected by shadows

Thx for the reply.

Is there a solution you can recommend?

I would really like a solution to this as well. This has really been bugging me lately.

Ah… it works I see if you use a Transparent Cutout shader… just no sophisticated alpha, on or off only. It’s nice you have a slider for alpha cutoff though.

Yes. I knew about that actually. Trouble is sometimes a cut out shader just wont cut it :\

Agreed~

Good to know… I didn’t know this.
But it’s a bit limiting… is there around a shader that allows to blend and shadows?

I would like to know this as well. If not is it possible to make your own shader to do so and has anyone already done it and not mind sharing?

This isn’t possible since alpha blended shaders do not write into the depth buffer which is required for depth map shadows.

Thx for the explanation.
Will just have to take a different approach to making decals, focus on hard edged details…

OMG… this means that in example windows with some alpha blending will ALWAYS look odd?
I think it can’t be that way…

Cracks in a wall are one thing, but I’m worried about people’s hair glowing brightly as they stand in the shadow of a building.

:\

Is it not possible to write an alpha blended shader that does write to the depth buffer ?

Definently need a way for stuff with softer alpha channel to blend between shadows… I mean how else would you do a nice muddy dirty look and spread it around your buildings…

Sure it’s possible somehow. Wgy not just have a two pass system of first rendering a cutout-shader, with low value on the cutout, but only to the depthbuffer, and then another pass of the actual alphablended surface, using this data.
It’s really needed. I’m not good enough in shaders to write stuff like this…

That sounds good, I hope you’re right about it being possible. Is there an able shader programmer among us willing to create such an animal ?

:lol:
When I say things are possible within areas I only grasp the very basics off, it’s just because I tend to be a little too self confident! Don’t use my post as anything but a scream for this feature myself… :wink:

Well. I spent some of last night poking around with shader code, but to no avail. Is there a shader programmer around that can at least confirm if this is possible ?

I’d be willing to pay someone for a set of transparent+shadows shaders.

Frameshift Decal Framework offers us a way out~

http://forum.unity3d.com/viewtopic.php?t=54613&postdays=0&postorder=asc&start=0

Woot! That looks really good. I will try this out tonight. Is this only good for decals or can the shaders be used on any mesh, for example a character’s hair ?