17a58f7db0
All probes (including the world background probe) are stored in a single texture. Each probe can be of any resolution as long as it is a power of 2 and not larger than 2048. So valid options are (2048x2048, 1024x1024, 512x512, etc). Each probe can be stored in their own resolution and can be set by the user. > NOTE: Eventually we would like to add automatic resolution selection. The probes are packed in an 2d texture array with the dimension of 2048*2048. The number of layers depends on the actual needed layers. If more layers are needed the texture will be recreated. This can happen when a new reflection probe is added, or an existing reflection probe is made visible to the scene or its resolution is changed. ### Octahedral mapping Probes are rendered into a cubemap. To reduce memory needs and improve sampling performance the cubemap is stored in octahedral mapping space. This is done in `eevee_reflection_probe_remap_comp.glsl`. The regular octahedral mapping has been extended to fix leakages at the edges of the texture and to be able to be used on an atlas texture and by sampling the texture once. To reduce sampling cost and improve the quality we add an border around the octahedral map and extend the octahedral coordinates. This also allows us to generate lower resolution mipmaps of the atlas texture using 2x2 box filtering from a higher resolution. ### Subdivisions and areas Probes data are stored besides the texture. The data is used to find out where the probe is stored in the texture. It is also used to find free space to store new probes. This approach ensures that we can be flexible at storing probes with different resolutions on the same layer. Lets see an example how that works Code-wise this is implemented by `ProbeLocationFinder`. ProbeLocationFinder can view a texture in a given subdivision level and mark areas that are covered by probes. When finding a free spot it returns the first empty area. **Notes** * Currently the cubemap is rendered with a fixed resolution and mipmaps are generated in order to increase the quality of the atlas. Eventually we should use dynamic resolution and no mipmaps. This will be done as part of the light probe baking change. Pull Request: https://projects.blender.org/blender/blender/pulls/109688 |
||
---|---|---|
.. | ||
freestyle | ||
modules | ||
presets | ||
site | ||
startup | ||
templates_osl | ||
templates_py |