[SOLVED] Need help to improve my shader code

Changed this as you said so it reads noise just once now.

Some detailed profiler info (note vsync is disabled)

Without noise map:

https://i.imgur.com/OGfpiqB.png

With noise map:

https://i.imgur.com/atIMqUh.png

With noise map but without below code from my other post:

float s = smoothstep(0.0, 1.0, noise.g) * 0.25;
diffuseColor.rgb = pow(diffuseColor.rgb, vec3(0.9 + s));

https://i.imgur.com/xYIIry3.png

It looks like the effect of pow() is negligible.

I am ok with this if it is just my 2010 GPU chip, I suppose it should be fine on today’s gaming GPU beasts! :slightly_smiling_face:

1 Like