Skip to content

Sky shaders

Cody Glassman requested to merge into master

Enables use of shaders for sky and all its child nodes.

sky.cpp was getting quite large and was a nightmare of nested classes within classes, so I moved things around.

Lighting was quite expensive for weather particles, especially with legacy lighting where we iterate over every light so I've given them a special path in our object shaders.

Labeled as a draft as the sky is made of many different parts and I haven't gone through with a fine tooth comb yet, I plan to in near future. There was a bug or two with our previous sky and I wouldn't be surprised if there were more. Please, if you think something is off compare it to Morrowind.exe first and not the behavior of sky before this MR.

Should fix a few bugs I found along the way, closes: #5088 (closed) #6161 (closed) #6168 (closed)

Note: When shaders are enabled, occlusion queries seem to work on my iGPU drivers for first time with the sun. The culprit for me was the legacy style alpha testing, which this MR obviously doesn't use.

Edited by Cody Glassman

Merge request reports