|
Blender V5.3
|
#include "gpu_shader_compat.hh"Go to the source code of this file.
Classes | |
| struct | rgb9e5_t |
Macros | |
| #define | RGB9E5_EXPONENT_BITS 5 |
| #define | RGB9E5_MANTISSA_BITS 9 |
| #define | RGB9E5_EXP_BIAS 15 |
| #define | RGB9E5_MAX_VALID_BIASED_EXP 31 |
| #define | MAX_RGB9E5_EXP (RGB9E5_MAX_VALID_BIASED_EXP - RGB9E5_EXP_BIAS) |
| #define | RGB9E5_MANTISSA_VALUES (1 << RGB9E5_MANTISSA_BITS) |
| #define | MAX_RGB9E5_MANTISSA (RGB9E5_MANTISSA_VALUES - 1) |
Functions | |
| int | rgb9e5_floor_log2 (float x) |
| float | rgb9e5_exponent_factor (int exponent) |
| rgb9e5_t | rgb9e5_from_float3 (float3 color) |
| uint | rgb9e5_encode (float3 color) |
| float3 | rgb9e5_decode (uint data) |
| #define MAX_RGB9E5_EXP (RGB9E5_MAX_VALID_BIASED_EXP - RGB9E5_EXP_BIAS) |
Definition at line 23 of file gpu_shader_shared_exponent.bsl.hh.
| #define MAX_RGB9E5_MANTISSA (RGB9E5_MANTISSA_VALUES - 1) |
Definition at line 25 of file gpu_shader_shared_exponent.bsl.hh.
Referenced by rgb9e5_decode(), and rgb9e5_from_float3().
| #define RGB9E5_EXP_BIAS 15 |
Definition at line 20 of file gpu_shader_shared_exponent.bsl.hh.
Referenced by rgb9e5_exponent_factor(), and rgb9e5_from_float3().
| #define RGB9E5_EXPONENT_BITS 5 |
Software implementation of encoding and decoding of shared exponent texture as described by the OpenGL extension EXT_texture_shared_exponent Appendix https://registry.khronos.org/OpenGL/extensions/EXT/EXT_texture_shared_exponent.txt
This allows to read and write the RGB9_E5 format in a R32UI texture without explicit support on the hardware for this type. However, filtering is not supported in this case.
Definition at line 18 of file gpu_shader_shared_exponent.bsl.hh.
| #define RGB9E5_MANTISSA_BITS 9 |
Definition at line 19 of file gpu_shader_shared_exponent.bsl.hh.
Referenced by rgb9e5_decode(), rgb9e5_encode(), and rgb9e5_exponent_factor().
| #define RGB9E5_MANTISSA_VALUES (1 << RGB9E5_MANTISSA_BITS) |
Definition at line 24 of file gpu_shader_shared_exponent.bsl.hh.
| #define RGB9E5_MAX_VALID_BIASED_EXP 31 |
Definition at line 21 of file gpu_shader_shared_exponent.bsl.hh.
| float3 rgb9e5_decode | ( | uint | data | ) |
Definition at line 76 of file gpu_shader_shared_exponent.bsl.hh.
References MAX_RGB9E5_MANTISSA, rgb9e5_decode(), rgb9e5_exponent_factor(), and RGB9E5_MANTISSA_BITS.
Referenced by eevee::deferred::Combine::load_radiance_direct(), rgb9e5_decode(), and eevee::subsurface::setup_main().
| uint rgb9e5_encode | ( | float3 | color | ) |
Definition at line 68 of file gpu_shader_shared_exponent.bsl.hh.
References rgb9e5_encode(), rgb9e5_from_float3(), and RGB9E5_MANTISSA_BITS.
Referenced by eevee::subsurface::convolve_main(), rgb9e5_encode(), and eevee::deferred::LightEval::write_radiance_direct().
| float rgb9e5_exponent_factor | ( | int | exponent | ) |
Definition at line 36 of file gpu_shader_shared_exponent.bsl.hh.
References exp2, RGB9E5_EXP_BIAS, rgb9e5_exponent_factor(), and RGB9E5_MANTISSA_BITS.
Referenced by rgb9e5_decode(), rgb9e5_exponent_factor(), and rgb9e5_from_float3().
| int rgb9e5_floor_log2 | ( | float | x | ) |
Definition at line 27 of file gpu_shader_shared_exponent.bsl.hh.
References floatBitsToInt, rgb9e5_floor_log2(), and x.
Referenced by rgb9e5_floor_log2(), and rgb9e5_from_float3().
Definition at line 47 of file gpu_shader_shared_exponent.bsl.hh.
References clamp(), float, max, MAX_RGB9E5_MANTISSA, RGB9E5_EXP_BIAS, rgb9e5_exponent_factor(), rgb9e5_floor_log2(), and rgb9e5_from_float3().
Referenced by rgb9e5_encode(), and rgb9e5_from_float3().