#Shadow Only Shader in URP
1 messages · Page 1 of 1 (latest)
I don't want to have two skinned meshes
tho I might have to
I hoped to avoid it because its all on skinned meshes
Not sure how textbook correct this is but has worked for me
#if SHADERPASS == SHADERPASS_SHADOWCASTER
state = true;
#endif```
Probably doesn't require Lit graph, if shadowcasting keywords are set manually
What's the goal here ? If you have only one skinned mesh, what do you want it to do, if it's not to only render shadows ?
I wa going to use a render feature to override the material on a second pass but that didn't work
so i think this one's in the bin for me
Yeah, nope, renderer features don't inject into the shadowmapping passes.
Is there a specific reason you only need shadows, but would have to have two skinned meshes in that case?
So i already have a mesh thats visible, but the shadows are screwed on it since im using a shader to scale the mesh based on an FOV and Scale factor for my fps
So i was looking into ways of having normal shadows on the mesh without having multiple meshes basically
Screwed in what way?
Huge, as if the fov sscalong applies from the direction the light points in, and it doesn't match up with the mesh at all
Fov scaling away from the light's direction? I'm curious what that looks like because I can't really imagine what that accomplishes
The shadows are HUGE like way bigger than the mesh, and onlu visible in one specific direction, so I'm trying to figure out how to get shadows that match, without using two renderers
Scaling to emulate a different FoV for a mesh is useful in general, but shadows are pretty challenging
Even if the shadow casting part of the mesh is scaled in some desirable way, it'll still not line up with the visible mesh so self-shadowing would be broken without more workarounds
selfshadowing isnt a concern for me right now
I'll probably just add a second skinned mesh and set it to shadows only
Still can't picture the benefit of doing that, but you probably have a plan
The custom node or one similar to it could work in vertex stage so that seems useful in your case