-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Description
Description
Hey hello there
I'm re-opening the interest for a UVNode that could overwrite the original UV's
but also trying to get my head about how to get to transform the normal of an object just before the internal normalNode calculation ?
I'm currently building a sphere impostor that replicates the entires shading of a material, but instead usinga billboard plane.
To do so this requires to calculate a new set of normal, and a new set of spherical uv
Problem is, I cannot rewrite the UV's, but also, to extend the normalNode material it requires to reintegrate the default normalNode behavior entirely manually... ( normalmap, bump map etc... )
The idea would be to replace those, just before it goes into the internal material behavior, before the fragment shader happen ? Those calculations needs to happen in the fragment shader.
Is there a way to rewrite those ?
In legacy threejs, this was something quite simple, just replacing a part of a string at the start of the fragment shader for the normals for example, and same for the uvs
normalNode is also a bit misleading, normalNode as the wiki says, is to re-write all the normal calculations ( normalmap / bump etc.. ) but is there a node just to write normals ?
Those things would enhanced the capacity to extend a material, what ever the nature of the material is
This could work on any material / phong / standard / physical / basic the same way for all
Happy to discuss !