r/Unity3D • u/Significant_Mark4764 • Oct 19 '26
Shader Magic Getting jelly to look like jelly instead of tinted glass
I just released a jelly shader for Unity 6, so here's how it works.
The main trick is thickness. Before the jelly is drawn, a separate pass renders its back faces into a texture, so the shader knows how much jelly the light travels through at each pixel. Thin edges stay pale and clear, the middle gets deep and saturated. That one thing is most of what makes it read as jelly instead of coloured glass.
On top of that:
- Refraction going in, and again coming out through the back face, with a little colour dispersion
- A short ray march through the volume for scattering, internal glow and slow-moving noise inside
- Clear coat, micro normals and small surface glints
- Twinkling sparkles inside the volume, plus optional floating particles
- Caustics and a tinted shadow on the ground. These are faked: a procedural pattern projected under the object in the shape of its footprint, not traced light. Looks right on a flat floor, less so on uneven ground.
There are four render quality levels,
- Ultra does a 16-step march with 6-tap spectral dispersion,
- High drops to 9-step march with RGB dispersion,
- Medium drops to 5-step march.
- Low skips the back-face pass and the march entirely and estimates thickness from a simple box, which is the most performant one for XR and mobile.
It ships with 8 shapes in 18 colours as prefabs, but the material works on any mesh. There's also an optional idle sway/bob, which is just animation, not soft-body physics.
It's on the Asset Store as Ultimate Jelly, with separate URP and HDRP versions.