- Edited
Adding normals to a Shader(Graph)
Hi, I'm using this setup for rendering just about everything in my game:
In order to get Spine / SkeletonAnimation / Lighting (from probes + realtime spot) to work I'm having to enable 'Add Normals' under Skeleton Animation/Advanced settings.
The tooltip on that checkbox mentions it's more efficient to get the shader to assume a single normal ... Any hints on how I'd actually do that?
I can hardcode a Vector 3 node in the shader graph, plugged into the Normal input on the PBR Master node ... not sure what V3 would work or if that's even a good idea though!
The normal in object space pointing forward would be Vector3(0, 0, -1)
. So you should be fine when you input this vector as vertex normal.
Ah, thank you! I was trying to plug it into the Normal input, not the Vertex Normal ... another lesson learned!
Yes, the first few inputs with the Vertex
prefix come from the vertex attributes, the other ones without any prefix usually come from textures sampled at the respective uv coordinates (or fixed constant values if they don't vary across the texture) .