Some weeks ago I created a material to simulate a velvet for an app by following the instructions in this post:
I was satisfied with the result with some tweaking.
I reopened it today to apply some changes on the app, but it’s seems like recent updates bugged that the process to make the fresnel broken.
My material is totally blasted like if I had put an emissive map on it, but I didn’t.
In previous versions of the engine we were applying scene intensity to the material’s overridden sphereMap & envMap. This was fixed in 1.52 and so in your example the sphere is white because it no longer is being multiplied by the scene intensity of 0.01.
Material’s “Environment” settings should have its own “Intensity” setting for this. Hopefully we could add this soonish.
Until then you could override this and this chunk by multiplying the calculated reflection by 0.01.
No worries @DevEdge, I’m sorry we broke your project.
I’ve added a script to the root node of https://playcanvas.com/project/883400 (which is just a fork of your test project) that fixes the issue in your case. It’s not a great solution and may stop working in future, but should tide you over for now.
The script just updates the envConstPS shader chunk as follows: pc.shaderChunks.envConstPS = pc.shaderChunks.envConstPS.replace('return color;', 'return color * 0.01;');
I’ve realised we actually need to address the underlying environment intensity issue otherwise it will likely crop up again for our users.
The script works like a charm!!
Thank you so much for this quick fix, I’ve never seen software developers react so quickly, I cannot be grateful enough.