Micro Shadows

Is there a way you guys could add support for Micro shadows for non-directional lights?
Without it most of my materials look really bad, especially materials from quixel-megascan


This is what it looks like without micro shadows in unity:

And this is with micro shadows enabled:

But I can’t get the same with boosting the AO when using point lights or SpotLights.

If that’s not viable then a slider to boost a material’s AO value globally (Even under direct lighting) would be really useful. :slight_smile:

Also, can someone suggest a better sphere than the default unity sphere to view materials? because it really looks ugly.

Maybe check HDRP’s material samples. They have unity sphere. It looks like this

1 Like

One more thing I wanna ask is what should I do with my post-processing volume to get a result similar to what quixel has?

I get a really soft image for some reason

Is that using DXR btw?

I think the micro shadow looks very bad. It’s unrealistic and it’s too dark.
I am using Parallax shader. It looks realistic with contact shadow and SSAO.
8K megascan textures in my scene.

Micro shadow on
Parallax on

Micro shadow on
Parallax off

Micro shadow off
Parallax on

Micro shadow off
Parallax off

1 Like

Can you share the settings for parallax effect, I wasn’t able to get good enough results :frowning:

Unfortunately, this question has already been asked, and for now, there’s no plan to support more type of light in the near/medium future for micro shadows.

Is that a design decision? If not, if you can give some places in HDRP code that implements microshadows, maybe community can send pull request.

The algorithm has been developed explicitly for Dir Light. It could be technically copy pasted to take care other types of lights (punctuals) but since it was designed for dir light, it could also give unexpected results.

For pointers, you can look at the function “ShadeSurface_Directional” in com.unity.render-pipelines.high-definition\Runtime\Lighting\SurfaceShading.hlsl, there’s a function called “ComputeMicroShadowing” called. You could do the same for the ShadeSurface_Punctuals and see what results it gives :slight_smile:

This function is located in com.unity.render-pipelines.core\ShaderLibrary\CommonLighting.hlsl

4 Likes