33 int blitsize[2], texsize[2];
39 blitsize[0] = (int)viewport_size[0];
40 blitsize[1] = (int)viewport_size[1];
48 GPU_framebuffer_ensure_config(
49 &fbl->
bloom_blit_fb, {GPU_ATTACHMENT_NONE, GPU_ATTACHMENT_TEXTURE(effects->bloom_blit)});
60 const float minDim = (
float)
MIN2(blitsize[0], blitsize[1]);
61 const float maxIter = (radius - 8.0f) +
log(minDim) /
log(2);
80 texsize[0] =
MAX2(texsize[0], 2);
81 texsize[1] =
MAX2(texsize[1], 2);
88 GPU_framebuffer_ensure_config(
90 {GPU_ATTACHMENT_NONE, GPU_ATTACHMENT_TEXTURE(effects->bloom_downsample[i])});
99 texsize[0] =
MAX2(texsize[0], 2);
100 texsize[1] =
MAX2(texsize[1], 2);
104 GPU_framebuffer_ensure_config(
106 {GPU_ATTACHMENT_NONE, GPU_ATTACHMENT_TEXTURE(effects->bloom_upsample[i])});
129 bool resolve_add_base)
191 const bool use_antiflicker =
true;
310 {GPU_ATTACHMENT_NONE, GPU_ATTACHMENT_TEXTURE(txl->bloom_accum)});
typedef float(TangentPoint)[2]
MINLINE float max_ff(float a, float b)
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void copy_v2_v2_int(int r[2], const int a[2])
MINLINE void mul_v3_v3fl(float r[3], const float a[3], float f)
struct Scene * DEG_get_evaluated_scene(const struct Depsgraph *graph)
@ EEVEE_RENDER_PASS_BLOOM
@ SCE_EEVEE_BLOOM_ENABLED
#define DRW_shgroup_call(shgroup, geom, ob)
void GPU_framebuffer_bind(GPUFrameBuffer *fb)
struct GPUShader GPUShader
struct GPUTexture GPUTexture
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position CLAMP
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
GPUBatch * DRW_cache_fullscreen_quad_get(void)
const DRWContextState * DRW_context_state_get(void)
const float * DRW_viewport_size_get(void)
void DRW_shgroup_uniform_vec4(DRWShadingGroup *shgroup, const char *name, const float *value, int arraysize)
void DRW_shgroup_uniform_vec3(DRWShadingGroup *shgroup, const char *name, const float *value, int arraysize)
DRWShadingGroup * DRW_shgroup_create(struct GPUShader *shader, DRWPass *pass)
void DRW_shgroup_uniform_texture_ref(DRWShadingGroup *shgroup, const char *name, GPUTexture **tex)
DRWPass * DRW_pass_create(const char *name, DRWState state)
void DRW_shgroup_uniform_bool_copy(DRWShadingGroup *shgroup, const char *name, const bool value)
void DRW_shgroup_uniform_float(DRWShadingGroup *shgroup, const char *name, const float *value, int arraysize)
void DRW_shgroup_uniform_vec2(DRWShadingGroup *shgroup, const char *name, const float *value, int arraysize)
void DRW_draw_pass(DRWPass *pass)
void DRW_texture_ensure_fullscreen_2d(GPUTexture **tex, eGPUTextureFormat format, DRWTextureFlag flags)
GPUTexture * DRW_texture_pool_query_2d(int w, int h, eGPUTextureFormat format, DrawEngineType *engine_type)
void EEVEE_bloom_output_accumulate(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata)
void EEVEE_bloom_output_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata, uint UNUSED(tot_samples))
void EEVEE_bloom_draw(EEVEE_Data *vedata)
int EEVEE_bloom_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata)
static const bool use_highres
static DRWShadingGroup * eevee_create_bloom_pass(const char *name, EEVEE_EffectsInfo *effects, struct GPUShader *sh, DRWPass **pass, bool upsample, bool resolve, bool resolve_add_base)
void EEVEE_bloom_cache_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata)
DrawEngineType draw_engine_eevee_type
struct GPUShader * EEVEE_shaders_bloom_blit_get(bool high_quality)
struct GPUShader * EEVEE_shaders_bloom_upsample_get(bool high_quality)
struct GPUShader * EEVEE_shaders_bloom_resolve_get(bool high_quality)
struct GPUShader * EEVEE_shaders_bloom_downsample_get(bool high_quality)
ccl_gpu_kernel_postfix ccl_global float int int int int float threshold
ccl_gpu_kernel_postfix ccl_global float int int int int sh
ccl_device_inline float3 log(float3 v)
struct Depsgraph * depsgraph
EEVEE_FramebufferList * fbl
float downsamp_texel_size[MAX_BLOOM_STEP][2]
struct GPUTexture * source_buffer
float bloom_curve_threshold[4]
float unf_source_texel_size[2]
struct GPUTexture * bloom_blit
struct GPUFrameBuffer * target_buffer
struct GPUTexture * bloom_upsample[MAX_BLOOM_STEP - 1]
struct GPUTexture * bloom_downsample[MAX_BLOOM_STEP]
float source_texel_size[2]
EEVEE_EffectsFlag enabled_effects
struct GPUTexture * unf_base_buffer
struct GPUTexture * unf_source_buffer
struct GPUFrameBuffer * main_fb
struct GPUFrameBuffer * bloom_blit_fb
struct GPUFrameBuffer * bloom_pass_accum_fb
struct GPUFrameBuffer * bloom_accum_fb[MAX_BLOOM_STEP - 1]
struct GPUFrameBuffer * bloom_down_fb[MAX_BLOOM_STEP]
struct DRWPass * bloom_resolve
struct DRWPass * bloom_upsample
struct DRWPass * bloom_downsample_first
struct DRWPass * bloom_blit
struct DRWPass * bloom_accum_ps
struct DRWPass * bloom_downsample
eViewLayerEEVEEPassType render_passes
struct EEVEE_PrivateData * g_data
struct EEVEE_EffectsInfo * effects
struct GPUTexture * bloom_accum