Skip to content

Add project setting for max irradiance size

Rafał Mikrut requested to merge github/fork/clayjohn/GLES3-irradiance-max into master

Created by: clayjohn

This places a cap on the size of the irradiance map. I found that most of the delay in radiance map generation was caused by generating the irradiance map. However, for most skies, the irradiance map needs few samples (and thus a small size). We were generating complex irradiance maps only because some high-frequency HDRI maps need them.

This PR restricts the size of the irradiance map. Effectively placing a cap on the number of samples taken, it should greatly increase the speed of radiance map generation and allow us to maintain the quality of irradiance maps for most HDRIs, when users need to improve quality for high-frequency maps, they can manually adjust the limit.

I wanted to add docs for it, but when I run --doctool I get the following error:

ERROR: CryptoMbedTLS::load_default_certificates: Condition ' default_certs != 0 ' is true.
   At: modules\mbedtls\crypto_mbedtls.cpp:201

@RodZill4 Can you test this out? I think it may be enough to solve https://github.com/godotengine/godot/issues/35552

Merge request reports