-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Vulkan: Light3D Reverse Cull Face not reimplemented yet #50005
Comments
This may be intended. Now that shadow normal offset bias/shadow pancaking has been implemented in the If this is the case, we should remove the Reverse Cull Face property from Light3D. |
Actually, Reverse Cull Face helps with reducing visible Shadow Acne with very low biases, as the Shadow acne appears in the parts that are occluded by the mesh and is generally far easier to get looking great with as little artifacting visible to the end user as possible. Here's an example in GLES 2 Please note that The settings are set up this way to Intentionally show the worst case, with all bias set to 0 and things like that. The artifacting with RCF Off is very easy to un-intentionally get when going far from the camera, or lowering shadow map resolution, things like that.. on the other hand RCF On in my experience doesn't seem to be having any major issues from all the testing I've done and it "Just Works" |
Ok Correction, just tested it with Omni Lights, and it also removes some other artifacting that plagues Omni lights at high radiuses with shadows, and low bias issues for all Lights, just have to give a slight negative bias to prevent visible light line around a shadowed object on the floor, same goes for the Spot lights... The slight negative bias also adds a small, very hard to notice dark rim onto the shadow casters. |
Do not use a bias value of 0 when Reverse Cull Face is disabled. We should add a node configuration warning for this 🙂 When Reverse Cull Face is disabled, you should use a slightly positive bias. When Reverse Cull Face is enabled, you should use a slightly negative bias. We can't change this behavior in |
As I said, I'm not advocating for Reverse Cull Face to be removed in |
While shadows have improved significantly in master, I disagree with that statement, especially for directional lights. While Reverse Cull Face Might not be a Must have & Must use in 4.0, it doesn't mean it isn't useful, and that it should be removed, as the ease of use with it is undeniable, because instead of having to worry a ton about both Shadow Acne and Peter Panning, you instead worry mostly about the light/dark rims (depending on bias) around the shadow caster if the shadow caster is on or intersecting the shadow recipients. What should be done with 4.0 regarding Reverse Cull Face is improving the documentation around it, explaining how it changes things, and why one should or shouldn't use it |
This is what increasing Bias Split Scale is for 🙂 Also, godotengine/godot-proposals#2729 will help with this as lower shadow blur makes shadow acne less visible. |
Bias Split Scale isn't in 4.0, it's in 3.3.2, 4.0 Has Pancakes... Blur does help produce shadow acne, and it is also helping with the issue in the distant splits, but the main issue is that distant splits are just such low effective resolution that Shadow Acne just Creeps in real easy. Without RCF you are balancing Peter Panning with Distant Shadow Acne, and either way you put it you get quite visible issues, be it the Peter Panning in your close up splits, or Shadow Acne far away and it's simply more complicated to get decent results and be sure that they're going to hold up well under many different viewing positions With RCF no need to worry about Shadow Acne and Peter Panning (aside from the slight stuff visible close up, the rims between Shadow caster and shadowed mesh) and you're free to play toy around with all the different split locations, resolutions and stuff, and if you manage to get things looking artifact-less close up, it's almost guaranteed that far away things will still look great. |
reduz said that Reverse Cull Face is intended to be supported in <reduz> @Calinou it is not intended though, its likely a bug, there are cases where you still want to reverse it
<reduz> or make it double sided
<Calinou> I guess double-sided makes sense, but this is implemented on a per-mesh basis rather than a per-light basis (in `3.x` at least)
<reduz> @Calinou it kinda may make sense per light in some cases too |
Just wanted to leave another use case in which revert cull faces are almost a Must-have: A 2D top-down scene with 3D geometries and shadows. Even with pancaking and well tuned bias settings, thin structures will leave a visible gap on the ground due to peter panning. With reverse cull face enabled, zero bias settings and ultra-precise shadows are possible because the shadow acne appears on the never visible back of the geometries. Of course this is only possible if no self-shadowing is needed (e.g. a terrain topology casting shadows onto itself). |
Godot version
v4.0.dev.custom_build [7d88c1a87]
System information
Windows 10, Vulkan, Nvidia Quadro K2000 461.92
Issue description
Reverse Cull Face doesn't do anything
Steps to reproduce
Make a scene with Shadows in 3.3.2 stable, toggle Reverse Cull Face, observe changes, then go do the same on current Master branch, observe lack of any changes
Minimal reproduction project
Culling.zip
The text was updated successfully, but these errors were encountered: