Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Bake custom shaders" not working #68

Open
wilg opened this issue Feb 1, 2023 · 9 comments
Open

"Bake custom shaders" not working #68

wilg opened this issue Feb 1, 2023 · 9 comments

Comments

@wilg
Copy link

wilg commented Feb 1, 2023

Baking seems to always use the default unity shaders, even though the documentation says that "bake custom shaders" will use the custom shaders. The unbaked prefab has the correct shaders.

@soupday
Copy link
Owner

soupday commented Feb 1, 2023

It's meant to. It will use the custom shaders for the bits that the default shaders cant replicate, with for HDRP is:

Eye shader - Eye depth and parallax
Hair Shader - Vertex colour blending.
Eye Occlusion/Tearline - Has vertex displacements.

Everything else bakes down to the default shaders. (Which should make for faster rendering materials.)

@wilg
Copy link
Author

wilg commented Feb 1, 2023

I see. I do notice some artifacts with the hair though:

Unbaked:

image

Baked:

image

@soupday
Copy link
Owner

soupday commented Feb 1, 2023

Ah yes, I've got to be honest here: I cocked up some of the code in the baking and it gets the two pass hair wrong when baking.

It's fixed in the current Dev version:
HDRP10 - https://github.com/soupday/cc_unity_tools_HDRP/tree/dev
HDRP12 - https://github.com/soupday/cc_unity_tools_HDRP/tree/HDRP12

@wilg wilg mentioned this issue Feb 1, 2023
@wilg
Copy link
Author

wilg commented Feb 1, 2023

Oh cool. Do you know what is up with the aliasing in the unbaked image?

@soupday
Copy link
Owner

soupday commented Feb 1, 2023

Is it set to two pass or single pass?

Also you may want to to turn the HDRP shadow filtering to medium. It's usually set to high and it applies that horrible dithering pattern to all the shadows.

@wilg
Copy link
Author

wilg commented Feb 1, 2023

Two-pass. Perhaps I need to try with your updated version?

@wilg
Copy link
Author

wilg commented Feb 1, 2023

And yes, I'm still totally struggling with HDRP shadows. I'll try adjusting the filtering settings.

@wilg
Copy link
Author

wilg commented Feb 1, 2023

New version from HDRP12 branch + rebake model. Fixes the clipping/depth issues. Also changed the shadow filtering to medium which does look better (what?!). It's still very aliased compared to the previous (broken) baked hair above. Is that normal?

image

@soupday
Copy link
Owner

soupday commented Feb 1, 2023

Try looking at the shadows settings on the lights objects themselves. They're usually set to quite low resolution.

Then you've got the shadow settings in the global/lighting volumes, including the Contact shadow overrides, Ambient Occlusion overrides. There's hundreds of shadow settings scattered all over.

If you look at the global volume and the lights in the preview scene, it might give you some idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants