You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Windows 10, Ryzen 3600x, Nvidia 3080 ti, Vulkan Forward+
Issue description
I have a light with a image texture (godot icon) pointing to a wall with a volumetric fog, and the fog isn't being affected by the projector image, doesn't change color or shape
Expected Behavior:
the fog should be taking the colors of the image and being affected more in the clear parts of the image, as in a foggy movie theater
Steps to reproduce
add a SpotLight3D
add a MeshInstance whit a BoxMesh as a wall
drag the icon.svg to the projector property of the SpotLight3D
point the light at the wall
add an environment
active volumetric fog in the environment and set density to 0
add a FogVolume to the scene covering the ligth and the wall with density 0.1
Bumping this with less emphasis on the colour and more on the shape issue. Without the shape support you cannot really use the light projection feature with fog.
Also valid in Godot 4.3
You can see the engine changes I made to enable this here
It works for both spotlights and omni lights. Since I'm not very familiar with the engine code, I wanted to check to see if this is something that would be desired as a PR and if there are any other things that would need to be addressed first.
One thing I'm unsure of is if the sc_projector_use_mipmaps() check and related code would be relevant for the volumetric_fog_process.glsl version or not.
Reacted by b_en Dev
Reacted by David Herrmann
Reacted by Zireael07, Serena, Isaac Marovitz and Pablo Avalos
@RachelfTech I missed the above comment earlier, so I figure I'd reply now (sorry for the delay).
There is an area light PR that supports volumetric fog, but it would still make sense to support this for other light types.
There's a pull request that implements volumetric fog projectors for all light types, including DirectionalLight3D as it depends on another PR that implements projectors in DirectionalLight3D.
Note that we are currently in feature freeze for 4.6, so feature PR reviews are going to take more time until 4.6.stable is released.
One thing I'm unsure of is if the sc_projector_use_mipmaps() check and related code would be relevant for the volumetric_fog_process.glsl version or not.
I'm not sure. While it would be more optimal1, implementing SCs in the volumetric fog shader would also increase codebase complexity. #106294 doesn't use specialization constants for the volumetric fog part either (only the directional light projectors in the standard lighting shader).
Footnotes
Specialization constants make it so the excluded part is completely ignored by the GPU, and not just skipped over. ↩
Activity
Calinou commentedon May 23, 2023
cc @clayjohn
HaSa1002 commentedon Sep 10, 2024
Bumping this with less emphasis on the colour and more on the shape issue. Without the shape support you cannot really use the light projection feature with fog.
Also valid in Godot 4.3
RachelfTech commentedon Sep 6, 2025
I addressed this issue for my recent video on procedural stained glass.
You can see the engine changes I made to enable this here
It works for both spotlights and omni lights. Since I'm not very familiar with the engine code, I wanted to check to see if this is something that would be desired as a PR and if there are any other things that would need to be addressed first.
The logic for this is mostly copied from where projectors are handled in scene_forward_lights_inc.glsl.
One thing I'm unsure of is if the
sc_projector_use_mipmaps()check and related code would be relevant for thevolumetric_fog_process.glslversion or not.Calinou commentedon Dec 21, 2025
@RachelfTech I missed the above comment earlier, so I figure I'd reply now (sorry for the delay).
There is an area light PR that supports volumetric fog, but it would still make sense to support this for other light types.
There's a pull request that implements volumetric fog projectors for all light types, including DirectionalLight3D as it depends on another PR that implements projectors in DirectionalLight3D.
Note that we are currently in feature freeze for 4.6, so feature PR reviews are going to take more time until 4.6.stable is released.
I'm not sure. While it would be more optimal1, implementing SCs in the volumetric fog shader would also increase codebase complexity. #106294 doesn't use specialization constants for the volumetric fog part either (only the directional light projectors in the standard lighting shader).
Footnotes
Specialization constants make it so the excluded part is completely ignored by the GPU, and not just skipped over. ↩