Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee_next/eevee_shader_shared.hh
| Show First 20 Lines • Show All 188 Lines • ▼ Show 20 Lines | |||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Film | /** \name Film | ||||
| * \{ */ | * \{ */ | ||||
| #define FILM_PRECOMP_SAMPLE_MAX 16 | #define FILM_PRECOMP_SAMPLE_MAX 16 | ||||
| enum eFilmWeightLayerIndex : uint32_t { | enum eFilmWeightLayerIndex : uint32_t { | ||||
jbakker: DisplayMode is incorrect name; it is not only used for display, also for readback of render… | |||||
| FILM_WEIGHT_LAYER_ACCUMULATION = 0u, | FILM_WEIGHT_LAYER_ACCUMULATION = 0u, | ||||
| FILM_WEIGHT_LAYER_DISTANCE = 1u, | FILM_WEIGHT_LAYER_DISTANCE = 1u, | ||||
| }; | }; | ||||
| enum ePassStorageType : uint32_t { | |||||
| PASS_STORAGE_COLOR = 0u, | |||||
| PASS_STORAGE_VALUE = 1u, | |||||
| PASS_STORAGE_CRYPTOMATTE = 2u, | |||||
| }; | |||||
| struct FilmSample { | struct FilmSample { | ||||
| int2 texel; | int2 texel; | ||||
| float weight; | float weight; | ||||
| /** Used for accumulation. */ | /** Used for accumulation. */ | ||||
| float weight_sum_inv; | float weight_sum_inv; | ||||
| }; | }; | ||||
| BLI_STATIC_ASSERT_ALIGN(FilmSample, 16) | BLI_STATIC_ASSERT_ALIGN(FilmSample, 16) | ||||
| Show All 40 Lines | struct FilmData { | ||||
| int environment_id; | int environment_id; | ||||
| int shadow_id; | int shadow_id; | ||||
| int ambient_occlusion_id; | int ambient_occlusion_id; | ||||
| /** Not indexed but still not -1 if enabled. */ | /** Not indexed but still not -1 if enabled. */ | ||||
| int depth_id; | int depth_id; | ||||
| int combined_id; | int combined_id; | ||||
| /** Id of the render-pass to be displayed. -1 for combined. */ | /** Id of the render-pass to be displayed. -1 for combined. */ | ||||
| int display_id; | int display_id; | ||||
| /** True if the render-pass to be displayed is from the value accum buffer. */ | /** Storage type of the render-pass to be displayed. */ | ||||
| bool1 display_is_value; | ePassStorageType display_storage_type; | ||||
Done Inline Actionsuse ePassStorageType as type. Our GLSL source preprocessor replaces it by uint. This allows strongly typed enum in C++ and better readability. Also I would rename it to display_type or display_storage_type. fclem: use `ePassStorageType` as type. Our GLSL source preprocessor replaces it by `uint`. This allows… | |||||
| /** True if we bypass the accumulation and directly output the accumulation buffer. */ | /** True if we bypass the accumulation and directly output the accumulation buffer. */ | ||||
| bool1 display_only; | bool1 display_only; | ||||
| /** Start of AOVs and number of aov. */ | /** Start of AOVs and number of aov. */ | ||||
| int aov_color_id, aov_color_len; | int aov_color_id, aov_color_len; | ||||
| int aov_value_id, aov_value_len; | int aov_value_id, aov_value_len; | ||||
| /** Start of cryptomatte per layer (-1 if pass is not enabled). */ | |||||
| int cryptomatte_object_id; | |||||
| int cryptomatte_asset_id; | |||||
| int cryptomatte_material_id; | |||||
| /** Max number of samples stored per layer (is even number). */ | |||||
| int cryptomatte_samples_len; | |||||
| /** Settings to render mist pass */ | /** Settings to render mist pass */ | ||||
| float mist_scale, mist_bias, mist_exponent; | float mist_scale, mist_bias, mist_exponent; | ||||
| /** Scene exposure used for better noise reduction. */ | /** Scene exposure used for better noise reduction. */ | ||||
| float exposure_scale; | float exposure_scale; | ||||
| /** Scaling factor for scaled resolution rendering. */ | /** Scaling factor for scaled resolution rendering. */ | ||||
| int scaling_factor; | int scaling_factor; | ||||
| /** Film pixel filter radius. */ | /** Film pixel filter radius. */ | ||||
| float filter_radius; | float filter_radius; | ||||
| ▲ Show 20 Lines • Show All 472 Lines • ▼ Show 20 Lines | |||||
| using LightCullingZdistBuf = draw::StorageArrayBuffer<float, LIGHT_CHUNK, true>; | using LightCullingZdistBuf = draw::StorageArrayBuffer<float, LIGHT_CHUNK, true>; | ||||
| using LightDataBuf = draw::StorageArrayBuffer<LightData, LIGHT_CHUNK>; | using LightDataBuf = draw::StorageArrayBuffer<LightData, LIGHT_CHUNK>; | ||||
| using MotionBlurDataBuf = draw::UniformBuffer<MotionBlurData>; | using MotionBlurDataBuf = draw::UniformBuffer<MotionBlurData>; | ||||
| using MotionBlurTileIndirectionBuf = draw::StorageBuffer<MotionBlurTileIndirection, true>; | using MotionBlurTileIndirectionBuf = draw::StorageBuffer<MotionBlurTileIndirection, true>; | ||||
| using SamplingDataBuf = draw::StorageBuffer<SamplingData>; | using SamplingDataBuf = draw::StorageBuffer<SamplingData>; | ||||
| using VelocityGeometryBuf = draw::StorageArrayBuffer<float4, 16, true>; | using VelocityGeometryBuf = draw::StorageArrayBuffer<float4, 16, true>; | ||||
| using VelocityIndexBuf = draw::StorageArrayBuffer<VelocityIndex, 16>; | using VelocityIndexBuf = draw::StorageArrayBuffer<VelocityIndex, 16>; | ||||
| using VelocityObjectBuf = draw::StorageArrayBuffer<float4x4, 16>; | using VelocityObjectBuf = draw::StorageArrayBuffer<float4x4, 16>; | ||||
| using CryptomatteObjectBuf = draw::StorageArrayBuffer<float2, 16>; | |||||
| } // namespace blender::eevee | } // namespace blender::eevee | ||||
| #endif | #endif | ||||
DisplayMode is incorrect name; it is not only used for display, also for readback of render layers. Basically there are 3 places where the results can be read from, value array, half color array, or cryptomatte (full color). ePassStorageType?