Sorry if I am in the wrong forum, but I’m using URP and I think it might have something to do with my issue.
I have a chessboard and I would like to use the particle system to highlight the squares. It works on dark squares but not on white squares, as you can see on the 2 screenshots here:
Basically I’m a coder so I know very little about particles, materials and shaders. I understand that making the board darker makes the particle appear but that would affect the global lighting balance.
Do you think I can solve this without replacing the particles with an ugly white square like everyone else?
I have tried making the start color darker but that didn’t help:
This is generic advice for highlighting tiles, not Chess:
It actually looks like the particle is there, just really brightly lit or blended.
See how there’s a radial gradient on this tile?
It’s a light colour on a light background, so you can’t see it well.
Your screenshot shows a gradient for the start colour:
If you want the colour to change over lifetime, move the gradient colouring to the Color over Lifetime module. That way the colour will animate over the particle’s life/duration.
Visually/aesthetically speaking, you’d also perhaps want to consider using a square highlight particle/tile FX instead of a radial gradient, although perhaps your particles are placeholders because that looks like the default particle texture.
That’s still light on light, and it looks like the particle is using additive blending (colour of particle is added over whatever is behind it). Try using alpha blending on the material and a colour that fits over both light and dark (like orange). The material of the board isn’t so relevant as the particle.
Thanks, you are right it’s litteraly a ShaderGraph material named Particle Additive. Raising the intensity from 2 to 8 helps a little but I guess I need another material because I can’t keep adding more lights to the scene.
That image helps! Seeing the material of the particle, I mean.
It seems simple enough you could just replace it with one of the included particle shaders.
For example, the built-in shader has HDR emissive (intensity), texture sheet frame blending (Tex Sheet Blending) and soft particles (Geo Fade, I’m assuming), as well as camera fading (Fade Distance?). I’m not sure what “Fix Dark Edges” does, but for your purposes it’s unlikely to be very useful based on the name.
Just make sure you set the rendering mode to Fade or Transparent.
There’s no need for lighting a self-lit material, and they are very, very cheap.
Built-in UNLIT (should work with URP):
URP Unlit OPAQUE (which is similar to your latest image):
TRANSPARENT:
This is alpha blending, and the colour of the particle isn’t added to what’s behind it, it’s replacing it.
Additive: gray particle over white background = white.
Alpha: gray particle over white background = gray.
TL;DR: Your particle/effect is simple. Just use a built-in particle shader, without additive blending, and with transparency.
Thanks, they work but they don’t take a texture as surface input so the effect is square. It’s good to know though. I think I can tweak this shadegraph so that the colors are right.
As for dark edges it’s caused by some PNGs if I understood well.
ETA: this is what I get so far, there is indeed some kind of dark edge but it’s the price to pay I guess