Having some problems with shaders and URP decal projectors. Are there any specific things I have to do to get URP decals to work with other stuff?
The shadow overlaps my units and I am not sure why.
1 messages · Page 1 of 1 (latest)
Having some problems with shaders and URP decal projectors. Are there any specific things I have to do to get URP decals to work with other stuff?
The shadow overlaps my units and I am not sure why.
You could step through your setup a bit
If you still have multiple cameras, which camera is meant to be drawing the decals
Sure thing
I still have two cameras, pixel and nonpixel. I'd like to use the nonpixel one preferably but if thats not possible that's fine
In both cameras, the URP decal proccess step thing is set on the renderer asset, and in both cameras the URP decal overlaps the unit
The unit's shader isnt doing too much special/interesting
but it is billboarding the quad towards the camera, but I dont see why that would make it render behind the URP decal
I dont think its my unit shader though because a default material quad still renders behind it
Hm why decal feature for both?
I was doing both just because it told me to add it to the asset to be able to see it
I can try turning it off for one or the other 
here is decal itself params, mostly default
Can't think of how the overlay camera could display the decal in any useful way, but even if it could I'd test them separately
hmm good point because its being projected on the terrain and if im not rendering the terrain there'd be nothing to project onto
turning off decals on the high res and only turning it on low res it does work, I hadnt tried that combo
I was going to do pixelated shadows anyways so I dont need them to be in the HD pass
Even if there's some additional issue making the decals render on top of stuff on the high res camera, might not have to cross that bridge if it never needs the decals
Yeah hopefully I can just get away with putting all my decals in the low res terrain
particle systems and being additive/mutiplicative I haven't tested if I can do that yet and really should
but im guessing I'm only going to be able to do alpha clip particles (if any particles at all)
Can't think of reasons why blend modes / transparency wouldn't work in that setup
But I guess it always depends
hmm low res shadows don't look that great after all
and ill probably have to update the terrain shader to support them complete, you can see they dont project on every material, only the first 4
I can't think of any way to render them in the high res composite pass since there is nothing in that pass to project onto
Could it be just a transparent mesh/sprite attached to the character?
Hmm I guess that's not too bad, though it does clip into the terrain since unlike a projected shadow decal, it's just a quad
I could make the quad orient itself to the terrain's normal on update but that might get performance costly to ping the terrain every frame for it's surface normal for every unit
I would've considered moving the shadow towards the camera in vertex stage
But both have drawbacks