-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
SpotLight3D turns negative, and creates black boxes on small angles with volumetric fog #78500
Comments
This looks suspiciously similar to a bug we already fixed. Could you try again with 4.0.3 to see if the bug has been fixed already? |
I tried with the latest available build, but the issue still persists. |
I can confirm this on v4.1.beta.custom_build [f2ce0b6] (Linux, GeForce RTX 4090 with NVIDIA 530.41.03). Disabling volumetric fog resolves the issue. |
This happens not just with SpotLight3D but also OmniLight3D, DirectionalLight and well any light in general I assume , in 4.1rc3 win 10, nvidia gtx 1660Ti. EDIT: But in my case it takes a while until it happens, it gradually cummulates over 30-60 minutes, I'm not 100% sure if it's the same as the above or not? The simples way to reproduce this is to turn on the directional light (it's on by default), enable volumetri fog, enable temporal reprojection (it's on by default), set the length to 0, then back to anything, then rotate the 3d viewport a bit and see it grow. It happens in real projects with regular length too but it takes longer. In the video you can see the whole thing happening, as long as you are in the light's range it can happen, it also happens when you only hover over editor's buttons and such (for some reason I have no idea why but it's there, clearly visible at the last part of the video) Video link: https://youtu.be/v9CuizB4kU4 @Calinou @Jonne-G would you mind checking if the above is related to the temporal reprojection as I mentioned above, please? |
I can reproduce this at least partially in 4.1.1 but not in 4.2 master, @Jonne-G can you please check? Though I think there are three issues included here. |
@viksl I tried in 4.2 with temporal reprojection turned off and on. I don't think the reprojection is the issue, from what I can tell it is working as intended i.e. reprojecting lighting data from previous frames to new ones. It's just that it gets garbled data. Unless I'm misunderstanding what you are referring to. |
@Jonne-G interesting, for me it looks way different at this point and I've been testing it to see if it spreads or not for hours and nothing on my side (win 10, nvidia gpu too), I also had it tested on linux with nvidia gpu and nothing but neither of these GPUs were rtx ones. The light turning negative on its own without checking negative checkbox also still happens? It happens only with spotlight not with omnilight, correct? |
I noticed that when I change the Video here: https://youtu.be/Vz-fKhp5scQ I also noticed going through the shader code that on line 426 I get Particularly it comes from: It happens only for one frame and then I get some float values but during this one frame Again the black areas are only visible with temporal reprojection on, if you turn it off it's hidden, if you turn it back on it shows just like it showed previously (meaning it's still storead in the texture I assume). The only way to get rid of this is either to quickly move the camera in the opposite direction or turning the volumetric fog itself on and then on again but if the I can't say for sure it's related but it does seem to connect. EDIT: |
I was finally able to reproduce this now after I made a HW upgrade (no idea why it does this only with certainl HW?), can you please test this: It's the same fix which was used with gles3, I don't know if this is also ok for vulkan side or not? If nothing else it does fixes this issue on my side. |
Godot version
v4.0.stable.official [92bee43]
System information
Windows 10, AMD 5 5600G, RTX 3060, Forward+ Shading
Issue description
When creating a SpotLight3D in a scene with fog, the light will first invert (e.g. opposite colours) and then create black splotches as seen in the screenshots below:
Angle of 2.0 degrees, range 15.0
Angle of 1.0 degrees, range 15.0,
Steps to reproduce
Create a spotlight with the following settings:
range: 15
angle: 1.0
Colour: ff3e00
Energy, Indirect Energy, and Volumetric Fog Energy: 500
Size: 1.0 m
And a world environment with volumetric fog on set to defaults.
Note that any angle below 3 seems to act strangely.
Minimal reproduction project
Note for opening the project: The scene opens with the camera close to the center of the scene.
Make sure to toggle the volumetric fog off and on to reset the dark spots.
SpotLight3DBugRepro.zip
The text was updated successfully, but these errors were encountered: