Aurigan

Hi, I'm using this setup for rendering just about everything in my game:

shader graph.png


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!
You do not have the required permissions to view the files attached to this post.
Aurigan
  • Posts: 16

Harald

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.
User avatar
Harald

Harri
  • Posts: 3994

Aurigan

Ah, thank you! I was trying to plug it into the Normal input, not the Vertex Normal ... another lesson learned!
Aurigan
  • Posts: 16

Harald

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) .
User avatar
Harald

Harri
  • Posts: 3994


Return to Unity