Blender  V2.93
eevee_renderpasses.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * Copyright 2019, Blender Foundation.
17  */
18 
23 #include "DRW_engine.h"
24 #include "DRW_render.h"
25 
26 #include "draw_color_management.h" /* TODO remove dependency. */
27 
28 #include "BKE_global.h" /* for G.debug_value */
29 
30 #include "BLI_hash.h"
31 #include "BLI_string_utils.h"
32 
33 #include "DEG_depsgraph_query.h"
34 
35 #include "eevee_private.h"
36 
49 
50 /* bitmask containing all renderpasses that need post-processing */
51 #define EEVEE_RENDERPASSES_WITH_POST_PROCESSING \
52  (EEVEE_RENDER_PASS_Z | EEVEE_RENDER_PASS_MIST | EEVEE_RENDER_PASS_NORMAL | \
53  EEVEE_RENDER_PASS_AO | EEVEE_RENDER_PASS_BLOOM | EEVEE_RENDER_PASS_VOLUME_LIGHT | \
54  EEVEE_RENDER_PASS_SHADOW | EEVEE_RENDERPASSES_MATERIAL)
55 
56 #define EEVEE_RENDERPASSES_ALL \
57  (EEVEE_RENDERPASSES_WITH_POST_PROCESSING | EEVEE_RENDER_PASS_COMBINED)
58 
59 #define EEVEE_RENDERPASSES_POST_PROCESS_ON_FIRST_SAMPLE \
60  (EEVEE_RENDER_PASS_Z | EEVEE_RENDER_PASS_NORMAL)
61 
62 #define EEVEE_RENDERPASSES_COLOR_PASS \
63  (EEVEE_RENDER_PASS_DIFFUSE_COLOR | EEVEE_RENDER_PASS_SPECULAR_COLOR | EEVEE_RENDER_PASS_EMIT | \
64  EEVEE_RENDER_PASS_BLOOM)
65 #define EEVEE_RENDERPASSES_LIGHT_PASS \
66  (EEVEE_RENDER_PASS_DIFFUSE_LIGHT | EEVEE_RENDER_PASS_SPECULAR_LIGHT)
67 /* Render passes that uses volume transmittance when available */
68 #define EEVEE_RENDERPASSES_USES_TRANSMITTANCE \
69  (EEVEE_RENDER_PASS_DIFFUSE_COLOR | EEVEE_RENDER_PASS_SPECULAR_COLOR | EEVEE_RENDER_PASS_EMIT | \
70  EEVEE_RENDER_PASS_ENVIRONMENT)
72 {
73  EEVEE_StorageList *stl = vedata->stl;
74  EEVEE_PrivateData *g_data = stl->g_data;
76 }
77 
78 /* Calculate the hash for an AOV. The least significant bit is used to store the AOV
79  * type the rest of the bits are used for the name hash. */
81 {
82  int hash = BLI_hash_string(aov->name) << 1;
84  return hash;
85 }
86 
88 {
89  const DRWContextState *draw_ctx = DRW_context_state_get();
90  EEVEE_StorageList *stl = vedata->stl;
91  EEVEE_PrivateData *g_data = stl->g_data;
92  ViewLayer *view_layer = draw_ctx->view_layer;
93  View3D *v3d = draw_ctx->v3d;
94 
95  if (v3d) {
96  const Scene *scene = draw_ctx->scene;
97  eViewLayerEEVEEPassType render_pass = v3d->shading.render_pass;
98  g_data->aov_hash = 0;
99 
100  if (render_pass == EEVEE_RENDER_PASS_BLOOM &&
101  ((scene->eevee.flag & SCE_EEVEE_BLOOM_ENABLED) == 0)) {
102  render_pass = EEVEE_RENDER_PASS_COMBINED;
103  }
104  if (render_pass == EEVEE_RENDER_PASS_AOV) {
106  &view_layer->aovs, v3d->shading.aov_name, offsetof(ViewLayerAOV, name));
107  if (aov != NULL) {
108  g_data->aov_hash = EEVEE_renderpasses_aov_hash(aov);
109  }
110  else {
111  /* AOV not found in view layer. */
112  render_pass = EEVEE_RENDER_PASS_COMBINED;
113  }
114  }
115 
116  g_data->render_passes = render_pass;
117  }
118  else {
119  eViewLayerEEVEEPassType enabled_render_passes = view_layer->eevee.render_passes;
120 
121 #define ENABLE_FROM_LEGACY(name_legacy, name_eevee) \
122  SET_FLAG_FROM_TEST(enabled_render_passes, \
123  (view_layer->passflag & SCE_PASS_##name_legacy) != 0, \
124  EEVEE_RENDER_PASS_##name_eevee);
125 
127  ENABLE_FROM_LEGACY(MIST, MIST)
129  ENABLE_FROM_LEGACY(SHADOW, SHADOW)
130  ENABLE_FROM_LEGACY(AO, AO)
131  ENABLE_FROM_LEGACY(EMIT, EMIT)
132  ENABLE_FROM_LEGACY(ENVIRONMENT, ENVIRONMENT)
133  ENABLE_FROM_LEGACY(DIFFUSE_COLOR, DIFFUSE_COLOR)
134  ENABLE_FROM_LEGACY(GLOSSY_COLOR, SPECULAR_COLOR)
135  ENABLE_FROM_LEGACY(DIFFUSE_DIRECT, DIFFUSE_LIGHT)
136  ENABLE_FROM_LEGACY(GLOSSY_DIRECT, SPECULAR_LIGHT)
137 
138  ENABLE_FROM_LEGACY(ENVIRONMENT, ENVIRONMENT)
139 
140 #undef ENABLE_FROM_LEGACY
141  if (DRW_state_is_image_render() && !BLI_listbase_is_empty(&view_layer->aovs)) {
142  enabled_render_passes |= EEVEE_RENDER_PASS_AOV;
143  g_data->aov_hash = EEVEE_AOV_HASH_ALL;
144  }
145 
146  g_data->render_passes = (enabled_render_passes & EEVEE_RENDERPASSES_ALL) |
148  }
151 }
152 
154  const EEVEE_PrivateData *g_data)
155 {
156  if (effects->enabled_effects & EFFECT_VOLUMETRIC) {
157  if (g_data->render_passes &
159  return true;
160  }
161  }
162  return false;
163 }
164 
166  EEVEE_Data *vedata,
167  uint tot_samples)
168 {
169  EEVEE_FramebufferList *fbl = vedata->fbl;
170  EEVEE_TextureList *txl = vedata->txl;
171  EEVEE_StorageList *stl = vedata->stl;
172  EEVEE_EffectsInfo *effects = stl->effects;
173  EEVEE_PrivateData *g_data = stl->g_data;
174 
175  const bool needs_post_processing = (g_data->render_passes &
177  if (needs_post_processing) {
178  /* Create FrameBuffer. */
179 
180  /* Should be enough to store the data needs for a single pass.
181  * Some passes will use less, but it is only relevant for final renderings and
182  * when renderpasses other than `EEVEE_RENDER_PASS_COMBINED` are requested */
184  GPU_framebuffer_ensure_config(&fbl->renderpass_fb,
185  {GPU_ATTACHMENT_NONE, GPU_ATTACHMENT_TEXTURE(txl->renderpass)});
186 
187  if ((g_data->render_passes & EEVEE_RENDERPASSES_MATERIAL) != 0) {
188  EEVEE_material_output_init(sldata, vedata, tot_samples);
189  }
190 
191  if ((g_data->render_passes & EEVEE_RENDER_PASS_MIST) != 0) {
192  EEVEE_mist_output_init(sldata, vedata);
193  }
194  if ((g_data->render_passes & EEVEE_RENDER_PASS_SHADOW) != 0) {
195  EEVEE_shadow_output_init(sldata, vedata, tot_samples);
196  }
197 
198  if ((g_data->render_passes & EEVEE_RENDER_PASS_AO) != 0) {
199  EEVEE_occlusion_output_init(sldata, vedata, tot_samples);
200  }
201 
202  if ((g_data->render_passes & EEVEE_RENDER_PASS_BLOOM) != 0 &&
203  (effects->enabled_effects & EFFECT_BLOOM) != 0) {
204  EEVEE_bloom_output_init(sldata, vedata, tot_samples);
205  }
206 
207  if (eevee_renderpasses_volumetric_active(effects, g_data)) {
208  EEVEE_volumes_output_init(sldata, vedata, tot_samples);
209  }
210 
211  /* We set a default texture as not all post processes uses the inputBuffer. */
212  g_data->renderpass_input = txl->color;
213  g_data->renderpass_col_input = txl->color;
214  g_data->renderpass_light_input = txl->color;
215  g_data->renderpass_transmittance_input = txl->color;
216  }
217  else {
218  /* Free unneeded memory */
221  }
222 
223  /* Cryptomatte doesn't use the GPU shader for post processing */
224  if ((g_data->render_passes & (EEVEE_RENDER_PASS_CRYPTOMATTE)) != 0) {
225  EEVEE_cryptomatte_output_init(sldata, vedata, tot_samples);
226  }
227 }
228 
230 {
231  EEVEE_PassList *psl = vedata->psl;
232  EEVEE_PrivateData *g_data = vedata->stl->g_data;
234 
235  const bool needs_post_processing = (g_data->render_passes &
237  if (needs_post_processing) {
240  psl->renderpass_pass);
241  DRW_shgroup_uniform_texture_ref(grp, "inputBuffer", &g_data->renderpass_input);
242  DRW_shgroup_uniform_texture_ref(grp, "inputColorBuffer", &g_data->renderpass_col_input);
244  grp, "inputSecondLightBuffer", &g_data->renderpass_light_input);
246  grp, "inputTransmittanceBuffer", &g_data->renderpass_transmittance_input);
247  DRW_shgroup_uniform_texture_ref(grp, "depthBuffer", &dtxl->depth);
248  DRW_shgroup_uniform_block_ref(grp, "common_block", &sldata->common_ubo);
249  DRW_shgroup_uniform_block_ref(grp, "renderpass_block", &sldata->renderpass_ubo.combined);
250  DRW_shgroup_uniform_int(grp, "currentSample", &g_data->renderpass_current_sample, 1);
251  DRW_shgroup_uniform_int(grp, "renderpassType", &g_data->renderpass_type, 1);
252  DRW_shgroup_uniform_int(grp, "postProcessType", &g_data->renderpass_postprocess, 1);
254  }
255  else {
256  psl->renderpass_pass = NULL;
257  }
258 }
259 
260 /* Post-process data to construct a specific render-pass
261  *
262  * This method will create a shading group to perform the post-processing for the given
263  * `renderpass_type`. The post-processing will be done and the result will be stored in the
264  * `vedata->txl->renderpass` texture.
265  *
266  * Only invoke this function for passes that need post-processing.
267  *
268  * After invoking this function the active frame-buffer is set to `vedata->fbl->renderpass_fb`. */
270  EEVEE_Data *vedata,
271  eViewLayerEEVEEPassType renderpass_type,
272  int aov_index)
273 {
274  EEVEE_PassList *psl = vedata->psl;
275  EEVEE_TextureList *txl = vedata->txl;
276  EEVEE_FramebufferList *fbl = vedata->fbl;
277  EEVEE_StorageList *stl = vedata->stl;
278  EEVEE_PrivateData *g_data = stl->g_data;
279  EEVEE_EffectsInfo *effects = stl->effects;
280 
281  /* Compensate for taa_current_sample being incremented after last drawing in
282  * EEVEE_temporal_sampling_draw when DRW_state_is_image_render(). */
283  const int current_sample = DRW_state_is_image_render() ? effects->taa_current_sample - 1 :
284  effects->taa_current_sample;
285  g_data->renderpass_current_sample = current_sample;
286  g_data->renderpass_type = renderpass_type;
288  const bool volumetric_active = eevee_renderpasses_volumetric_active(effects, g_data);
289  eRenderPassPostProcessType default_color_pass_type =
291  g_data->renderpass_transmittance_input = volumetric_active ? txl->volume_transmittance_accum :
292  txl->color;
293 
294  if (!volumetric_active && renderpass_type == EEVEE_RENDER_PASS_VOLUME_LIGHT) {
295  /* Early exit: Volumetric effect is off, but the volume light pass was requested. */
296  static float clear_col[4] = {0.0f};
298  GPU_framebuffer_clear_color(fbl->renderpass_fb, clear_col);
299  return;
300  }
301 
302  switch (renderpass_type) {
303  case EEVEE_RENDER_PASS_Z: {
305  break;
306  }
307  case EEVEE_RENDER_PASS_AO: {
309  g_data->renderpass_input = txl->ao_accum;
310  break;
311  }
314  g_data->renderpass_input = effects->ssr_normal_input;
315  break;
316  }
317  case EEVEE_RENDER_PASS_MIST: {
319  g_data->renderpass_input = txl->mist_accum;
320  break;
321  }
324  g_data->renderpass_input = txl->volume_scatter_accum;
325  break;
326  }
329  g_data->renderpass_input = txl->shadow_accum;
330  break;
331  }
333  g_data->renderpass_postprocess = default_color_pass_type;
334  g_data->renderpass_input = txl->diff_color_accum;
335  break;
336  }
338  g_data->renderpass_postprocess = default_color_pass_type;
339  g_data->renderpass_input = txl->spec_color_accum;
340  break;
341  }
343  g_data->renderpass_postprocess = default_color_pass_type;
344  g_data->renderpass_input = txl->env_accum;
345  break;
346  }
347  case EEVEE_RENDER_PASS_EMIT: {
348  g_data->renderpass_postprocess = default_color_pass_type;
349  g_data->renderpass_input = txl->emit_accum;
350  break;
351  }
354  g_data->renderpass_input = txl->spec_light_accum;
355  g_data->renderpass_col_input = txl->spec_color_accum;
356  if ((stl->effects->enabled_effects & EFFECT_SSR) != 0) {
358  g_data->renderpass_light_input = txl->ssr_accum;
359  }
360  else {
362  }
363  break;
364  }
367  g_data->renderpass_input = txl->diff_light_accum;
368  g_data->renderpass_col_input = txl->diff_color_accum;
369  if ((stl->effects->enabled_effects & EFFECT_SSS) != 0) {
371  g_data->renderpass_light_input = txl->sss_accum;
372  }
373  else {
375  }
376  break;
377  }
378  case EEVEE_RENDER_PASS_AOV: {
380  g_data->renderpass_input = txl->aov_surface_accum[aov_index];
381  break;
382  }
385  g_data->renderpass_input = txl->bloom_accum;
386  g_data->renderpass_current_sample = 1;
387  break;
388  }
389  default: {
390  break;
391  }
392  }
395 }
396 
398  EEVEE_Data *vedata,
399  bool post_effect)
400 {
401  EEVEE_StorageList *stl = vedata->stl;
402  EEVEE_EffectsInfo *effects = stl->effects;
403  EEVEE_PrivateData *g_data = stl->g_data;
404  eViewLayerEEVEEPassType render_pass = g_data->render_passes;
405 
406  if (!post_effect) {
407  if ((render_pass & EEVEE_RENDER_PASS_MIST) != 0) {
408  EEVEE_mist_output_accumulate(sldata, vedata);
409  }
410  if ((render_pass & EEVEE_RENDER_PASS_AO) != 0) {
411  EEVEE_occlusion_output_accumulate(sldata, vedata);
412  }
413  if ((render_pass & EEVEE_RENDER_PASS_SHADOW) != 0) {
414  EEVEE_shadow_output_accumulate(sldata, vedata);
415  }
416  if ((render_pass & EEVEE_RENDERPASSES_MATERIAL) != 0) {
417  EEVEE_material_output_accumulate(sldata, vedata);
418  }
419  if (eevee_renderpasses_volumetric_active(effects, g_data)) {
420  EEVEE_volumes_output_accumulate(sldata, vedata);
421  }
422  if ((render_pass & EEVEE_RENDER_PASS_CRYPTOMATTE) != 0) {
423  EEVEE_cryptomatte_output_accumulate(sldata, vedata);
424  }
425  }
426  else {
427  if ((render_pass & EEVEE_RENDER_PASS_BLOOM) != 0 &&
428  (effects->enabled_effects & EFFECT_BLOOM) != 0) {
429  EEVEE_bloom_output_accumulate(sldata, vedata);
430  }
431  }
432 }
433 
435 {
436  EEVEE_FramebufferList *fbl = vedata->fbl;
437  EEVEE_TextureList *txl = vedata->txl;
438  EEVEE_StorageList *stl = vedata->stl;
439  EEVEE_EffectsInfo *effects = stl->effects;
441 
442  /* We can only draw a single render-pass. Light-passes also select their color pass
443  * (a second pass). We mask the light pass when a light pass is selected. */
444  const eViewLayerEEVEEPassType render_pass =
447  stl->g_data->render_passes;
448 
449  bool is_valid = (render_pass & EEVEE_RENDERPASSES_ALL) != 0;
450  bool needs_color_transfer = (render_pass & EEVEE_RENDERPASSES_COLOR_PASS) != 0 &&
452  UNUSED_VARS(needs_color_transfer);
453 
454  if ((render_pass & EEVEE_RENDER_PASS_BLOOM) != 0 &&
455  (effects->enabled_effects & EFFECT_BLOOM) == 0) {
456  is_valid = false;
457  }
458 
459  const int current_sample = stl->effects->taa_current_sample;
460  const int total_samples = stl->effects->taa_total_sample;
462  (current_sample > 1 && total_samples != 1)) {
463  return;
464  }
465 
466  if (is_valid) {
467  EEVEE_renderpasses_postprocess(sldata, vedata, render_pass, 0);
470  }
471  else {
472  /* Draw state is not valid for this pass, clear the buffer */
473  static float clear_color[4] = {0.0f, 0.0f, 0.0f, 1.0f};
475  GPU_framebuffer_clear_color(dfbl->default_fb, clear_color);
476  }
478 }
479 
481 {
482  EEVEE_TextureList *txl = vedata->txl;
483  EEVEE_StorageList *stl = vedata->stl;
484  EEVEE_EffectsInfo *effects = stl->effects;
485 
486  GPUTexture *tx = NULL;
487  /* Debug : Output buffer to view. */
488  switch (G.debug_value) {
489  case 1:
490  tx = txl->maxzbuffer;
491  break;
492  case 2:
493  /* UNUSED */
494  break;
495  case 3:
496  tx = effects->ssr_normal_input;
497  break;
498  case 4:
499  tx = effects->ssr_specrough_input;
500  break;
501  case 5:
502  tx = txl->color_double_buffer;
503  break;
504  case 6:
505  tx = effects->gtao_horizons_renderpass;
506  break;
507  case 7:
508  tx = effects->gtao_horizons_renderpass;
509  break;
510  case 8:
511  tx = effects->sss_irradiance;
512  break;
513  case 9:
514  tx = effects->sss_radius;
515  break;
516  case 10:
517  tx = effects->sss_albedo;
518  break;
519  case 11:
520  tx = effects->velocity_tx;
521  break;
522  default:
523  break;
524  }
525 
526  if (tx) {
527  DRW_transform_none(tx);
528  }
529 }
#define BLI_INLINE
BLI_INLINE unsigned int BLI_hash_string(const char *str)
Definition: BLI_hash.h:83
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
Definition: BLI_listbase.h:124
void * BLI_findstring(const struct ListBase *listbase, const char *id, const int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
unsigned int uint
Definition: BLI_sys_types.h:83
#define UNUSED_VARS(...)
#define UNUSED(x)
#define SET_FLAG_FROM_TEST(value, test, flag)
eViewLayerEEVEEPassType
@ EEVEE_RENDER_PASS_AO
@ EEVEE_RENDER_PASS_NORMAL
@ EEVEE_RENDER_PASS_DIFFUSE_LIGHT
@ EEVEE_RENDER_PASS_VOLUME_LIGHT
@ EEVEE_RENDER_PASS_AOV
@ EEVEE_RENDER_PASS_BLOOM
@ EEVEE_RENDER_PASS_DIFFUSE_COLOR
@ EEVEE_RENDER_PASS_CRYPTOMATTE
@ EEVEE_RENDER_PASS_Z
@ EEVEE_RENDER_PASS_ENVIRONMENT
@ EEVEE_RENDER_PASS_COMBINED
@ EEVEE_RENDER_PASS_SPECULAR_LIGHT
@ EEVEE_RENDER_PASS_SPECULAR_COLOR
@ EEVEE_RENDER_PASS_EMIT
@ EEVEE_RENDER_PASS_MIST
@ EEVEE_RENDER_PASS_SHADOW
@ AOV_TYPE_COLOR
@ SCE_EEVEE_BLOOM_ENABLED
@ DRW_STATE_WRITE_COLOR
Definition: DRW_render.h:315
#define DRW_PASS_CREATE(pass, state)
Definition: DRW_render.h:593
#define DRW_shgroup_call(shgroup, geom, ob)
Definition: DRW_render.h:420
#define DRW_TEXTURE_FREE_SAFE(tex)
Definition: DRW_render.h:180
#define GPU_FRAMEBUFFER_FREE_SAFE(fb)
void GPU_framebuffer_bind(GPUFrameBuffer *fb)
struct GPUTexture GPUTexture
Definition: GPU_texture.h:33
@ GPU_RGBA16F
Definition: GPU_texture.h:94
#define Z
Definition: GeomUtils.cpp:215
Group RGB to NORMAL
Scene scene
bool is_valid
GPUBatch * DRW_cache_fullscreen_quad_get(void)
Definition: draw_cache.c:358
void DRW_transform_none(GPUTexture *tex)
bool DRW_state_is_opengl_render(void)
DefaultFramebufferList * DRW_viewport_framebuffer_list_get(void)
Definition: draw_manager.c:697
const DRWContextState * DRW_context_state_get(void)
bool DRW_state_is_image_render(void)
DefaultTextureList * DRW_viewport_texture_list_get(void)
Definition: draw_manager.c:702
void DRW_shgroup_uniform_block_ref(DRWShadingGroup *shgroup, const char *name, GPUUniformBuf **ubo)
DRWShadingGroup * DRW_shgroup_create(struct GPUShader *shader, DRWPass *pass)
void DRW_shgroup_uniform_int(DRWShadingGroup *shgroup, const char *name, const int *value, int arraysize)
void DRW_shgroup_uniform_texture_ref(DRWShadingGroup *shgroup, const char *name, GPUTexture **tex)
void DRW_draw_pass(DRWPass *pass)
void DRW_texture_ensure_fullscreen_2d(GPUTexture **tex, eGPUTextureFormat format, DRWTextureFlag flags)
void EEVEE_bloom_output_accumulate(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata)
Definition: eevee_bloom.c:331
void EEVEE_bloom_output_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata, uint UNUSED(tot_samples))
Definition: eevee_bloom.c:305
void EEVEE_cryptomatte_output_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata, int UNUSED(tot_samples))
void EEVEE_cryptomatte_output_accumulate(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata)
void EEVEE_cryptomatte_renderpasses_init(EEVEE_Data *vedata)
void EEVEE_material_renderpasses_init(EEVEE_Data *vedata)
void EEVEE_material_output_accumulate(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_material_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, uint tot_samples)
void EEVEE_mist_output_accumulate(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata)
Definition: eevee_mist.c:93
void EEVEE_mist_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
Definition: eevee_mist.c:35
void EEVEE_occlusion_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, uint tot_samples)
void EEVEE_occlusion_output_accumulate(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_shadow_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, uint tot_samples)
#define EEVEE_AOV_HASH_COLOR_TYPE_MASK
#define EEVEE_RENDERPASSES_MATERIAL
@ EFFECT_SSS
@ EFFECT_BLOOM
@ EFFECT_SSR
@ EFFECT_VOLUMETRIC
void EEVEE_volumes_output_accumulate(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_volumes_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, uint tot_samples)
void EEVEE_shadow_output_accumulate(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
#define EEVEE_AOV_HASH_ALL
struct GPUShader * EEVEE_shaders_renderpasses_post_process_sh_get(void)
#define EEVEE_RENDERPASSES_POST_PROCESS_ON_FIRST_SAMPLE
void EEVEE_renderpasses_postprocess(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata, eViewLayerEEVEEPassType renderpass_type, int aov_index)
void EEVEE_renderpasses_output_accumulate(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, bool post_effect)
#define EEVEE_RENDERPASSES_ALL
#define EEVEE_RENDERPASSES_USES_TRANSMITTANCE
BLI_INLINE bool eevee_renderpasses_volumetric_active(const EEVEE_EffectsInfo *effects, const EEVEE_PrivateData *g_data)
void EEVEE_renderpasses_init(EEVEE_Data *vedata)
void EEVEE_renderpasses_draw(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_renderpasses_draw_debug(EEVEE_Data *vedata)
void EEVEE_renderpasses_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, uint tot_samples)
#define ENABLE_FROM_LEGACY(name_legacy, name_eevee)
void EEVEE_renderpasses_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
int EEVEE_renderpasses_aov_hash(const ViewLayerAOV *aov)
#define EEVEE_RENDERPASSES_LIGHT_PASS
#define EEVEE_RENDERPASSES_WITH_POST_PROCESSING
bool EEVEE_renderpasses_only_first_sample_pass_active(EEVEE_Data *vedata)
eRenderPassPostProcessType
@ PASS_POST_ACCUMULATED_COLOR_ALPHA
@ PASS_POST_NORMAL
@ PASS_POST_TWO_LIGHT_BUFFERS
@ PASS_POST_ACCUMULATED_VALUE
@ PASS_POST_DEPTH
@ PASS_POST_AO
@ PASS_POST_ACCUMULATED_LIGHT
@ PASS_POST_ACCUMULATED_TRANSMITTANCE_COLOR
@ PASS_POST_UNDEFINED
@ PASS_POST_ACCUMULATED_COLOR
#define EEVEE_RENDERPASSES_COLOR_PASS
#define hash
Definition: noise.c:169
struct Scene * scene
Definition: DRW_render.h:745
struct ViewLayer * view_layer
Definition: DRW_render.h:746
struct View3D * v3d
Definition: DRW_render.h:742
struct GPUFrameBuffer * default_fb
struct GPUTexture * depth
EEVEE_TextureList * txl
EEVEE_StorageList * stl
EEVEE_PassList * psl
EEVEE_FramebufferList * fbl
struct GPUTexture * gtao_horizons_renderpass
struct GPUTexture * sss_irradiance
struct GPUTexture * ssr_specrough_input
struct GPUTexture * sss_radius
EEVEE_EffectsFlag enabled_effects
struct GPUTexture * velocity_tx
struct GPUTexture * ssr_normal_input
struct GPUTexture * sss_albedo
struct GPUFrameBuffer * main_fb
struct GPUFrameBuffer * renderpass_fb
struct DRWPass * renderpass_pass
eViewLayerEEVEEPassType render_passes
GPUTexture * renderpass_light_input
GPUTexture * renderpass_input
GPUTexture * renderpass_col_input
GPUTexture * renderpass_transmittance_input
struct EEVEE_PrivateData * g_data
struct EEVEE_EffectsInfo * effects
struct GPUTexture * sss_accum
struct GPUTexture * color_double_buffer
struct GPUTexture * spec_color_accum
struct GPUTexture * maxzbuffer
struct GPUTexture * diff_light_accum
struct GPUTexture * emit_accum
struct GPUTexture * renderpass
struct GPUTexture * volume_scatter_accum
struct GPUTexture * diff_color_accum
struct GPUTexture * ao_accum
struct GPUTexture * bloom_accum
struct GPUTexture * spec_light_accum
struct GPUTexture * volume_transmittance_accum
struct GPUTexture * color
struct GPUTexture * shadow_accum
struct GPUTexture * mist_accum
struct GPUTexture * env_accum
struct GPUTexture * aov_surface_accum[MAX_AOVS]
struct GPUTexture * ssr_accum
struct GPUUniformBuf * combined
struct EEVEE_ViewLayerData::@202 renderpass_ubo
struct GPUUniformBuf * common_ubo
struct SceneEEVEE eevee
View3DShading shading
struct ViewLayerEEVEE eevee
ListBase aovs
#define G(x, y, z)