Decal Shader using particles

i am currently seeking a way to create a decal shader that can apply to any surface. using particles. can someone help me out? i am a complete beginner for shaders

What do you mean by decals using particles? Decals are decals and particles are particles. Those are usually two completely different effects.

  • Do you really want a bunch of decals which are dancing around like a particle system? That would be odd thing to ask unless you have some very special effect in mind. And will need some clarification.

  • Do you want an effect where particles fly and leave a decal on the wall? Something like bullet hitting wall, sparks flying, decal looking like a bullet hole gets drawn on the wall. Those are just two independent effects used together.

  • Do you want particles which leave decals in the places that they hit surface? Something like blood or paint splatter which leaves stains on a wall. You could use OnParticleCollision for that, but it’s still mostly two independent effects. Although in many cases you could cheat and instead of checking for precise particle collision splatter some decals in roughly the same place as particle system was triggered. In many cases people won’t be looking as carefully to notice whether particle count and position precisely matches with decals.

As for decals themselves URP and HDRP have their decal projector components. There should be plenty of tutorials for those. I don’t think there is any builtin solution for built-in render pipeline.

so i simply want a Particle that when it hits a surface of anything. it will leave behind a decal that correctly applies to the surface it hits. so aka sticking to it. and i can’t use any scripting as the game i want to make this shader for does not give creators that ability.

Obviously if you got something better or something that may work better i am all ears,

So the third option. It is very unlikely that you will be able to get anything like that using only shader without any scripting. Shaders used for materials simply don’t have the the concept of something hitting something. If you had full control over particle system it might be possible to do something with multi stage particle system. It wouldn’t look as good as proper thing but better than nothing. Anyway all of that will highly depend on what exactly and how the game allows you to customize, what interfaces did it’s creator prepare and good understanding of what you are actually doing. Just because some effect are using shaders and some game allows you to customize some shaders, doesn’t mean you can do everything. There a lot more finer details to how things work together.

thats where Particle collisions come in. with Sub particles. having the shader that is responsible for said concept