How do I know which variables are built into PBRCustomMaterial?
For example, when I need to use uv, normal, the document can not give me a good help, only through the source code or error to find?
I also didn’t know there was a built-in variable in the source code called vPositionW!!!
Here is the clickable link to the PG you mentioned - https://playground.babylonjs.com/debug.html#6T8SBT#18
(it is easier to help when there is clickable link in question instead of link screenshot )
Could you make you question more specific and understandable?
The OP wants to know the variable names used in shaders.
I believe that now you already know
I have to admit that the first time I had a hard time too to find out all the variables availabe in different material shaders when I was writing my first MaterialPlugin. Those should be added to the docs and well maintained so we don’t need to look at the shader source codes when trying to inject our code into the shaders. The docs should also clearly describe the different built-in define variables we can use.
There are only two I use most often: default.vertex.fx + default.fragment.fx. Virtually all my plugins revolve around fragment.fx and I’m currently sitting at 20ish custom shaders. Plus if you run into any problems, the community here is super responsive. Never fear!