Skip to content

Fog sun scatter doesn't work without LIGHTX_* in sky shader #107924

Closed
@Kaleb-Reid

Description

@Kaleb-Reid

Tested versions

  • Reproducible in 4.4.1 stable, 4.5 beta 1.

System information

Void #1 SMP PREEMPT_DYNAMIC Sat Jun 21 02:19:00 UTC 2025 on X11 - X11 display driver, Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 970 (nvidia; 570.169) - Intel(R) Core(TM) i5-7600K CPU @ 3.80GHz (4 threads) - 15.50 GiB memory

Issue description

Sun scatter doesn't work if you don't use any of the LIGHTX_* built-ins in the sky shader. I'm assuming this is also why sun scatter doesn't work if you don't assign a sky material to the sky in the environment. My guess is that sun scatter is getting optimized out incorrectly if a LIGHTX_* built-in isn't used. It doesn't even have to be a light which is enabled or exists, just any light.

Steps to reproduce

  • Open mrp.
  • Uncomment any commented line in the sky shader.

Minimal reproduction project (MRP)

mrp.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions