Ho to make decals for slapping them on top of other geometry?

Hi,

I have a few platforms which I want to decorate with different types of Graffiti style decals. basically I want to have around 10+ decals of various graffiti images with alpha transparency applied to a single plane which later will be slapped onto various places on the platforms. The problem is I don’t know which shader/type I need to use for it to Not cast any shadows on underlying geometry and avoid Z-fighting problem. is it possible? Thanks in advance!

I’d just use the standard shader, with a transparent (alpha channel) texture.

To avoid Z-fighting, in a 2D game, give the decal sprites a slightly higher Order In Layer value than the platforms.

Ok! By thew way is there a difference between importing PNG with transparency and setting it as Sprite (2D and UI), or importing a plane (actual geometry) and applying the same texture on it?

Yes, there are differences. For example, the plane, by default, uses the standard shader, which means that how bright it is depends on the light sources, and it can also cast and receive shadows, etc. Sprites (by default) use the sprite shader, which always draws colors exactly as defined by the texture (no shading), and does not cast or receive shadows. The sprite renderer also handles layering in a different way (using the Order In Layer property, etc.).

1 Like

Aha now I get it! Thanks a lot JoeStrout!

1 Like