Eevee-Next: World Reflective Light #108149
|
@ -80,7 +80,7 @@ void WorldProbePipeline::sync()
|
|||
side.cubemap_face_ps.state_set(DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_ALWAYS);
|
||||
}
|
||||
const int2 extent(1);
|
||||
const eGPUTextureUsage usage = GPU_TEXTURE_USAGE_MEMORYLESS | GPU_TEXTURE_USAGE_SHADER_WRITE;
|
||||
constexpr eGPUTextureUsage usage = GPU_TEXTURE_USAGE_MEMORYLESS | GPU_TEXTURE_USAGE_SHADER_WRITE;
|
||||
dummy_cryptomatte_tx_.ensure_2d(GPU_RGBA32F, extent, usage);
|
||||
dummy_renderpass_tx_.ensure_2d(GPU_RGBA16F, extent, usage);
|
||||
dummy_aov_color_tx_.ensure_2d_array(GPU_RGBA16F, extent, 1, usage);
|
||||
|
|
|
@ -22,7 +22,7 @@ void ReflectionProbeModule::init()
|
|||
MAX_PROBES,
|
||||
GPU_TEXTURE_USAGE_SHADER_READ | GPU_TEXTURE_USAGE_ATTACHMENT,
|
||||
NULL,
|
||||
12);
|
||||
MIPMAP_LEVELS);
|
||||
GPU_texture_mipmap_mode(cubemaps_tx_, true, true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ class ReflectionProbeModule {
|
|||
* Must be a power of two; intension to be used as a cubemap atlas.
|
||||
*/
|
||||
static constexpr int MAX_RESOLUTION = 2048;
|
||||
Jeroen-Bakker marked this conversation as resolved
Outdated
|
||||
static constexpr int MIPMAP_LEVELS = 12;
|
||||
Jeroen-Bakker marked this conversation as resolved
Outdated
Clément Foucault
commented
Maybe derive it from Maybe derive it from `MAX_RESOLUTION` ? `log2(MAX_RESOLUTION) + 1`
|
||||
|
||||
/**
|
||||
* Index of the probe that is used for world background.
|
||||
|
|
|
@ -6,7 +6,8 @@ void light_world_eval(ClosureDiffuse diffuse,
|
|||
inout vec3 out_specular)
|
||||
{
|
||||
float linear_roughness = fast_sqrt(reflection.roughness);
|
||||
/* TODO: This should be based by actual LOD?.*/
|
||||
/* TODO: This should be based by actual resolution. Currently the resolution is fixed but
|
||||
* eventually this should based on a user setting. */
|
||||
Jeroen-Bakker marked this conversation as resolved
Outdated
Jeroen Bakker
commented
Check Check `lightprobe_filter_glossy_frag`
|
||||
float lod_cube_max = 12.0;
|
||||
float lod = linear_roughness * lod_cube_max;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
I don't know if this is covered by the next patch, but this should become an option.
Yes, that will be part of the reflection probe baking patch. Might even land earlier when specific parts of that patch are stable. Currently this part isn't stable to land in main yet.