#Question about URP lit shader

1 messages · Page 1 of 1 (latest)

karmic shard
#

I am using the URP Lit shader for these trees. I want the underside of the leaves to render, but they currently look as though they are receiving the light from the front (it's too bright). How do I get the underside of these leaves to look dark?

willow iron
#

If so, that renders light on only the front face, and duplicates it on the back face

#

You could make a shader graph that flips the normal to always face you so you only see the front face, but it can be inconvenient to make a new lit shader just for that

#

Another option is to duplicate the leaf polygons in a mesh editing program and flip their normals

#

That could also be done non-destructively and automatically with a modifier, like Blender's Solidify without edge geometry enabled

karmic shard
#

Ok, so this is a "limitation" of the shader. Say I use blender to flip the mesh normals. What would that do to the top of the leaves? Would they now be dark if I rotated the camera around?

willow iron
karmic shard
#

ah, I see

willow iron
#

So you've got two layers of leaves overlapping exactly, facing different directions

karmic shard
#

right. Ok, thanks for the feedback!

willow iron
#

It doubles the geometry for them, but geometry is relatively not expensive
Having to swap to a different shader during rendering hinders batching a bit

#

So I would usually prefer the extra geometry method

#

However if you also do vertex animation for wind or the like, using the mesh normals, then the undersides can become detached from the top sides of the leaves