# How to simulate glass dispersion with only one Principled BSDF node

Searching on the internet, I realized that Blender does not calculate the dispersion of the glass, in any case I have found a compromise, which is not precise, but let's say it does the "Dirty trick"

Personally, I'm taking a different way, and I like to create materials, always as much as possible without mixing "Shader" type nodes. In most cases, I can get all my materials, with the help of the Principled BSDF node, always connected directly to the Output node. In short, I like to work before the BSDF Principled node.

I was wondering if it was possible to do this trick using some math, or something similar linked to just one Principled BSDF, with no other shader nodes.

• This looks brilliant. I had just been thinking about such and thought there was no hope. I would try something with one or two color ramp nodes and the frensel node. Maybe use map range as well. – ZargulTheWizard Nov 10 '20 at 1:57

Interesting question. I think it'd be near impossible to do this as accurately as mixing glass nodes, but if absolute realism isn't your aim then of course your options open up.

Using a procedural texture at very small scale I was able to get this effect in cycles:

Although this is definitely not an accurate way of doing it, it does appear to be somewhat realistic and quite beautiful provided you have some good lighting. (Psst... HDRI)

The values in the colour ramp I did using the HSV mode and just changing the H value. The Hex values are: Black: #000000, Red: #FF0000, Green: #01FF00, Blue: #0001FF, and Black: #000000.

Let me know if there is something missing and I'll edit this response to include it.

Hope this helps!

• Very interesting, I was trying to use the 3 fresnel node to mix the separate RGB, but with no success. I believe it can be done (I hoped). But it seems very complicated to my brain. – Noob Cat Nov 11 '20 at 17:51
• The problem is is that although Fresnel has an IOR value, it can't really be used for glass. I very much doubt it would be possible whilst using a usable amount of nodes. This is probably your best shot imo. – ParallelMayhem Nov 11 '20 at 19:05