#Shadows are too dark on Custom URP shader

1 messages · Page 1 of 1 (latest)

alpine cloak
#

Hello! I'm having to reimplement the entirety of URP Lit shader in code so I'm able to add custom features to it.
I'm currently trying to replace a shader that already works and is just based off a texture and normal map. I'm able to get the texture up (i havent gotten to figuring out how to transform the normal map to a bump map yet).
The Problem at this point is that the shaders are too dark (I do have soft shadows on the shader, albiet soft shadows is just desharping the edges). How do i control the lighting level that is pushed onto my shader from another item?

Main Shader: https://paste.ofcode.org/4vQP2DRmee8xw84KYcsU3d

For reference, they both use the working, leaves shader, my shader is on the left trunk, the right is the working one. (I decompiled the shader graph for the other one and they use UniversalPBR lighting to calculate)

obtuse hound
#

What you're missing is ambient/env/indirect lighting.

#

You should probably look at the urp lit shader code if you want to replicate that.

alpine cloak
#

ahh gotcha, need to implement adding the indirect lighting. knew i was forgetting something simple. will check the URP lit shader, just feels super hard to follow because they define #frag and #vert in seperate files, without the naming convention to know that the shaders will be in a specific include file.

#

and the fact i have to search unity editor for the specific include files doesnt help lol

obtuse hound
alpine cloak
#

i didnt know you could configure vscode to do that. i have omnishader, but the shader support isnt real good right now. ill try precompling the urp lit. thank you for the info