WIP: eevee-next-world-irradiance #108304
|
@ -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;
|
||||
static constexpr int MIPMAP_LEVELS = 12;
|
||||
|
||||
/**
|
||||
* 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. */
|
||||
float lod_cube_max = 12.0;
|
||||
float lod = linear_roughness * lod_cube_max;
|
||||
|
||||
|
|
Loading…
Reference in New Issue