Blender  V3.3
eevee_render.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2016 Blender Foundation. */
3 
12 #include "DRW_engine.h"
13 #include "DRW_render.h"
14 
15 #include "DNA_node_types.h"
16 #include "DNA_object_types.h"
17 
18 #include "BKE_global.h"
19 #include "BKE_object.h"
20 
21 #include "BLI_rand.h"
22 #include "BLI_rect.h"
23 
24 #include "DEG_depsgraph_query.h"
25 
26 #include "GPU_capabilities.h"
27 #include "GPU_context.h"
28 #include "GPU_framebuffer.h"
29 #include "GPU_state.h"
30 
31 #include "RE_pipeline.h"
32 
33 #include "eevee_private.h"
34 
36 {
37  EEVEE_Data *vedata = (EEVEE_Data *)ved;
38  EEVEE_StorageList *stl = vedata->stl;
39  EEVEE_TextureList *txl = vedata->txl;
40  EEVEE_FramebufferList *fbl = vedata->fbl;
42  const float *size_orig = DRW_viewport_size_get();
43  float size_final[2];
44 
45  /* Init default FB and render targets:
46  * In render mode the default framebuffer is not generated
47  * because there is no viewport. So we need to manually create it or
48  * not use it. For code clarity we just allocate it make use of it. */
51 
52  /* Alloc transient data. */
53  if (!stl->g_data) {
54  stl->g_data = MEM_callocN(sizeof(*stl->g_data), __func__);
55  }
57  g_data->background_alpha = DRW_state_draw_background() ? 1.0f : 0.0f;
58  g_data->valid_double_buffer = 0;
59  copy_v2_v2(g_data->size_orig, size_orig);
60 
61  float *camtexcofac = g_data->camtexcofac;
63  g_data->overscan = scene->eevee.overscan / 100.0f;
64  g_data->overscan_pixels = roundf(max_ff(size_orig[0], size_orig[1]) * g_data->overscan);
65 
66  madd_v2_v2v2fl(size_final, size_orig, (float[2]){2.0f, 2.0f}, g_data->overscan_pixels);
67 
68  camtexcofac[0] = size_final[0] / size_orig[0];
69  camtexcofac[1] = size_final[1] / size_orig[1];
70 
71  camtexcofac[2] = -camtexcofac[0] * g_data->overscan_pixels / size_final[0];
72  camtexcofac[3] = -camtexcofac[1] * g_data->overscan_pixels / size_final[1];
73  }
74  else {
75  copy_v2_v2(size_final, size_orig);
76  g_data->overscan = 0.0f;
77  g_data->overscan_pixels = 0.0f;
78  copy_v4_fl4(camtexcofac, 1.0f, 1.0f, 0.0f, 0.0f);
79  }
80 
81  const int final_res[2] = {
82  size_orig[0] + g_data->overscan_pixels * 2.0f,
83  size_orig[1] + g_data->overscan_pixels * 2.0f,
84  };
85 
86  int max_dim = max_ii(final_res[0], final_res[1]);
87  if (max_dim > GPU_max_texture_size()) {
88  char error_msg[128];
89  BLI_snprintf(error_msg,
90  sizeof(error_msg),
91  "Error: Reported texture size limit (%dpx) is lower than output size (%dpx).",
93  max_dim);
94  RE_engine_set_error_message(engine, error_msg);
95  G.is_break = true;
96  return false;
97  }
98 
99  /* XXX overriding viewport size. Simplify things but is not really 100% safe. */
100  DRW_render_viewport_size_set(final_res);
101 
102  /* TODO: 32 bit depth. */
105 
106  GPU_framebuffer_ensure_config(
107  &dfbl->default_fb,
108  {GPU_ATTACHMENT_TEXTURE(dtxl->depth), GPU_ATTACHMENT_TEXTURE(txl->color)});
109  GPU_framebuffer_ensure_config(
110  &fbl->main_fb, {GPU_ATTACHMENT_TEXTURE(dtxl->depth), GPU_ATTACHMENT_TEXTURE(txl->color)});
111  GPU_framebuffer_ensure_config(&fbl->main_color_fb,
112  {GPU_ATTACHMENT_NONE, GPU_ATTACHMENT_TEXTURE(txl->color)});
113 
114  /* Camera could change because of Motion blur. */
115  g_data->cam_original_ob = RE_GetCamera(engine->re);
116 
117  return true;
118 }
119 
121  RenderEngine *engine,
122  struct Depsgraph *depsgraph)
123 {
125  EEVEE_StorageList *stl = vedata->stl;
126  EEVEE_PrivateData *g_data = vedata->stl->g_data;
127  EEVEE_FramebufferList *fbl = vedata->fbl;
128  /* TODO(sergey): Shall render hold pointer to an evaluated camera instead? */
129  struct Object *ob_camera_eval = DEG_get_evaluated_object(depsgraph, g_data->cam_original_ob);
130  EEVEE_render_view_sync(vedata, engine, depsgraph);
131 
132  /* `EEVEE_renderpasses_init` will set the active render passes used by `EEVEE_effects_init`.
133  * `EEVEE_effects_init` needs to go second for TAA. */
134  EEVEE_renderpasses_init(vedata);
135  EEVEE_effects_init(sldata, vedata, ob_camera_eval, false);
136  EEVEE_materials_init(sldata, vedata, stl, fbl);
137  EEVEE_shadows_init(sldata);
138  EEVEE_lightprobes_init(sldata, vedata);
139 }
140 
142 {
143  EEVEE_PrivateData *g_data = vedata->stl->g_data;
144 
145  /* Set the perspective & view matrix. */
146  float winmat[4][4], viewmat[4][4], viewinv[4][4];
147  /* TODO(sergey): Shall render hold pointer to an evaluated camera instead? */
148  struct Object *ob_camera_eval = DEG_get_evaluated_object(depsgraph, g_data->cam_original_ob);
149 
150  RE_GetCameraWindow(engine->re, ob_camera_eval, winmat);
151  RE_GetCameraWindowWithOverscan(engine->re, g_data->overscan, winmat);
152  RE_GetCameraModelMatrix(engine->re, ob_camera_eval, viewinv);
153 
154  invert_m4_m4(viewmat, viewinv);
155 
156  DRWView *view = DRW_view_create(viewmat, winmat, NULL, NULL, NULL);
157  DRW_view_reset();
160 
161  DRW_view_camtexco_set(view, g_data->camtexcofac);
162 }
163 
165 {
167  EEVEE_bloom_cache_init(sldata, vedata);
168  EEVEE_depth_of_field_cache_init(sldata, vedata);
169  EEVEE_effects_cache_init(sldata, vedata);
170  EEVEE_lightprobes_cache_init(sldata, vedata);
171  EEVEE_lights_cache_init(sldata, vedata);
172  EEVEE_materials_cache_init(sldata, vedata);
173  EEVEE_motion_blur_cache_init(sldata, vedata);
174  EEVEE_occlusion_cache_init(sldata, vedata);
175  EEVEE_screen_raytrace_cache_init(sldata, vedata);
176  EEVEE_subsurface_cache_init(sldata, vedata);
177  EEVEE_temporal_sampling_cache_init(sldata, vedata);
178  EEVEE_volumes_cache_init(sldata, vedata);
179  EEVEE_cryptomatte_cache_init(sldata, vedata);
180 }
181 
182 void EEVEE_render_cache(void *vedata,
183  struct Object *ob,
184  struct RenderEngine *engine,
185  struct Depsgraph *depsgraph)
186 {
188  EEVEE_Data *data = vedata;
189  EEVEE_StorageList *stl = data->stl;
191  EEVEE_LightProbesInfo *pinfo = sldata->probes;
192  bool cast_shadow = false;
193 
194  const bool do_cryptomatte = (engine != NULL) &&
195  ((g_data->render_passes & EEVEE_RENDER_PASS_CRYPTOMATTE) != 0);
196 
197  eevee_id_update(vedata, &ob->id);
198 
199  if (pinfo->vis_data.collection) {
200  /* Used for rendering probe with visibility groups. */
201  bool ob_vis = BKE_collection_has_object_recursive(pinfo->vis_data.collection, ob);
202  ob_vis = (pinfo->vis_data.invert) ? !ob_vis : ob_vis;
203 
204  if (!ob_vis) {
205  return;
206  }
207  }
208 
209  /* Don't print dupli objects as this can be very verbose and
210  * increase the render time on Windows because of slow windows term.
211  * (see T59649) */
212  if (engine && (ob->base_flag & BASE_FROM_DUPLI) == 0) {
213  char info[42];
214  BLI_snprintf(info, sizeof(info), "Syncing %s", ob->id.name + 2);
215  RE_engine_update_stats(engine, NULL, info);
216  }
217 
218  const int ob_visibility = DRW_object_visibility_in_active_context(ob);
219  if (ob_visibility & OB_VISIBLE_PARTICLES) {
220  EEVEE_particle_hair_cache_populate(vedata, sldata, ob, &cast_shadow);
221  if (do_cryptomatte) {
223  }
224  }
225 
226  if (ob_visibility & OB_VISIBLE_SELF) {
227  if (ELEM(ob->type, OB_MESH, OB_SURF, OB_MBALL)) {
228  EEVEE_materials_cache_populate(vedata, sldata, ob, &cast_shadow);
229  if (do_cryptomatte) {
231  }
232  }
233  else if (ob->type == OB_CURVES) {
234  EEVEE_object_curves_cache_populate(vedata, sldata, ob, &cast_shadow);
235  if (do_cryptomatte) {
237  }
238  }
239  else if (ob->type == OB_VOLUME) {
241  EEVEE_volumes_cache_object_add(sldata, vedata, scene, ob);
242  }
243  else if (ob->type == OB_LIGHTPROBE) {
244  EEVEE_lightprobes_cache_add(sldata, vedata, ob);
245  }
246  else if (ob->type == OB_LAMP) {
247  EEVEE_lights_cache_add(sldata, ob);
248  }
249  }
250 
251  if (cast_shadow) {
252  EEVEE_shadows_caster_register(sldata, ob);
253  }
254 }
255 
257  const char *viewname,
258  const rcti *rect,
259  const char *render_pass_name,
260  int num_channels,
261  GPUFrameBuffer *framebuffer,
262  EEVEE_Data *vedata)
263 {
264  RenderPass *rp = RE_pass_find_by_name(rl, render_pass_name, viewname);
265  if (rp == NULL) {
266  return;
267  }
268  GPU_framebuffer_bind(framebuffer);
269  GPU_framebuffer_read_color(framebuffer,
270  vedata->stl->g_data->overscan_pixels + rect->xmin,
271  vedata->stl->g_data->overscan_pixels + rect->ymin,
272  BLI_rcti_size_x(rect),
273  BLI_rcti_size_y(rect),
274  num_channels,
275  0,
277  rp->rect);
278 }
279 
281  const char *viewname,
282  const rcti *rect,
283  EEVEE_Data *vedata,
284  EEVEE_ViewLayerData *UNUSED(sldata))
285 {
287  rl, viewname, rect, RE_PASSNAME_COMBINED, 4, vedata->stl->effects->final_fb, vedata);
288 }
289 
291  const char *viewname,
292  const rcti *rect,
293  EEVEE_Data *vedata,
294  EEVEE_ViewLayerData *sldata)
295 {
296  const int current_sample = vedata->stl->effects->taa_current_sample;
297 
298  /* Only read the center texel. */
299  if (current_sample > 1) {
300  return;
301  }
302 
303  if ((vedata->stl->g_data->render_passes & EEVEE_RENDER_PASS_NORMAL) != 0) {
306  rl, viewname, rect, RE_PASSNAME_NORMAL, 3, vedata->fbl->renderpass_fb, vedata);
307  }
308 }
309 
311  const char *viewname,
312  const rcti *rect,
313  EEVEE_Data *vedata,
314  EEVEE_ViewLayerData *sldata)
315 {
316  const int current_sample = vedata->stl->effects->taa_current_sample;
317 
318  /* Only read the center texel. */
319  if (current_sample > 1) {
320  return;
321  }
322 
323  if ((vedata->stl->g_data->render_passes & EEVEE_RENDER_PASS_Z) != 0) {
326  rl, viewname, rect, RE_PASSNAME_Z, 1, vedata->fbl->renderpass_fb, vedata);
327  }
328 }
329 
331  const char *viewname,
332  const rcti *rect,
333  EEVEE_Data *vedata,
334  EEVEE_ViewLayerData *sldata)
335 {
336  if ((vedata->stl->g_data->render_passes & EEVEE_RENDER_PASS_MIST) != 0) {
339  rl, viewname, rect, RE_PASSNAME_MIST, 1, vedata->fbl->renderpass_fb, vedata);
340  }
341 }
342 
344  const char *viewname,
345  const rcti *rect,
346  EEVEE_Data *vedata,
347  EEVEE_ViewLayerData *sldata)
348 {
349  if ((vedata->stl->g_data->render_passes & EEVEE_RENDER_PASS_SHADOW) != 0) {
352  rl, viewname, rect, RE_PASSNAME_SHADOW, 3, vedata->fbl->renderpass_fb, vedata);
353  }
354 }
355 
357  const char *viewname,
358  const rcti *rect,
359  EEVEE_Data *vedata,
360  EEVEE_ViewLayerData *sldata)
361 {
362  if ((vedata->stl->g_data->render_passes & EEVEE_RENDER_PASS_AO) != 0) {
365  rl, viewname, rect, RE_PASSNAME_AO, 3, vedata->fbl->renderpass_fb, vedata);
366  }
367 }
368 
370  const char *viewname,
371  const rcti *rect,
372  EEVEE_Data *vedata,
373  EEVEE_ViewLayerData *sldata)
374 {
375  if ((vedata->stl->effects->enabled_effects & EFFECT_BLOOM) == 0) {
376  /* Bloom is not enabled. */
377  return;
378  }
379 
380  if ((vedata->stl->g_data->render_passes & EEVEE_RENDER_PASS_BLOOM) != 0) {
383  rl, viewname, rect, RE_PASSNAME_BLOOM, 3, vedata->fbl->renderpass_fb, vedata);
384  }
385 }
386 
387 #define EEVEE_RENDER_RESULT_MATERIAL_PASS(pass_name, eevee_pass_type) \
388  if ((vedata->stl->g_data->render_passes & EEVEE_RENDER_PASS_##eevee_pass_type) != 0) { \
389  EEVEE_renderpasses_postprocess(sldata, vedata, EEVEE_RENDER_PASS_##eevee_pass_type, 0); \
390  eevee_render_color_result( \
391  rl, viewname, rect, RE_PASSNAME_##pass_name, 3, vedata->fbl->renderpass_fb, vedata); \
392  }
393 
395  const char *viewname,
396  const rcti *rect,
397  EEVEE_Data *vedata,
398  EEVEE_ViewLayerData *sldata)
399 {
400  EEVEE_RENDER_RESULT_MATERIAL_PASS(DIFFUSE_COLOR, DIFFUSE_COLOR)
401 }
402 
404  const char *viewname,
405  const rcti *rect,
406  EEVEE_Data *vedata,
407  EEVEE_ViewLayerData *sldata)
408 {
409  EEVEE_RENDER_RESULT_MATERIAL_PASS(DIFFUSE_DIRECT, DIFFUSE_LIGHT)
410 }
411 
413  const char *viewname,
414  const rcti *rect,
415  EEVEE_Data *vedata,
416  EEVEE_ViewLayerData *sldata)
417 {
418  EEVEE_RENDER_RESULT_MATERIAL_PASS(GLOSSY_COLOR, SPECULAR_COLOR)
419 }
420 
422  const char *viewname,
423  const rcti *rect,
424  EEVEE_Data *vedata,
425  EEVEE_ViewLayerData *sldata)
426 {
427  EEVEE_RENDER_RESULT_MATERIAL_PASS(GLOSSY_DIRECT, SPECULAR_LIGHT)
428 }
429 
431  const char *viewname,
432  const rcti *rect,
433  EEVEE_Data *vedata,
434  EEVEE_ViewLayerData *sldata)
435 {
437 }
438 
440  const char *viewname,
441  const rcti *rect,
442  EEVEE_Data *vedata,
443  EEVEE_ViewLayerData *sldata)
444 {
445  EEVEE_RENDER_RESULT_MATERIAL_PASS(ENVIRONMENT, ENVIRONMENT)
446 }
447 
449  const char *viewname,
450  const rcti *rect,
451  EEVEE_Data *vedata,
452  EEVEE_ViewLayerData *sldata)
453 {
454  EEVEE_RENDER_RESULT_MATERIAL_PASS(VOLUME_LIGHT, VOLUME_LIGHT)
455 }
456 
458  const char *viewname,
459  const rcti *rect,
460  EEVEE_Data *vedata,
461  EEVEE_ViewLayerData *sldata)
462 {
463  if ((vedata->stl->g_data->render_passes & EEVEE_RENDER_PASS_AOV) != 0) {
464  const DRWContextState *draw_ctx = DRW_context_state_get();
465  ViewLayer *view_layer = draw_ctx->view_layer;
466  int aov_index = 0;
467  LISTBASE_FOREACH (ViewLayerAOV *, aov, &view_layer->aovs) {
468  if ((aov->flag & AOV_CONFLICT) != 0) {
469  continue;
470  }
471  EEVEE_renderpasses_postprocess(sldata, vedata, EEVEE_RENDER_PASS_AOV, aov_index);
472  switch (aov->type) {
473  case AOV_TYPE_COLOR:
475  rl, viewname, rect, aov->name, 4, vedata->fbl->renderpass_fb, vedata);
476  break;
477  case AOV_TYPE_VALUE:
479  rl, viewname, rect, aov->name, 1, vedata->fbl->renderpass_fb, vedata);
480  }
481  aov_index++;
482  }
483  }
484 }
485 
486 #undef EEVEE_RENDER_RESULT_MATERIAL_PASS
487 
489  const char *viewname,
490  const rcti *rect,
491  EEVEE_Data *vedata,
492  EEVEE_ViewLayerData *sldata)
493 {
494  if ((vedata->stl->g_data->render_passes & EEVEE_RENDER_PASS_CRYPTOMATTE) != 0) {
495  EEVEE_cryptomatte_render_result(rl, viewname, rect, vedata, sldata);
496  }
497 }
498 
500 {
501  EEVEE_FramebufferList *fbl = vedata->fbl;
502  EEVEE_StorageList *stl = vedata->stl;
503  EEVEE_PassList *psl = vedata->psl;
504 
505  /* Prevent background to write to data buffers.
506  * NOTE: This also make sure the textures are bound to the right double buffer. */
507  GPU_framebuffer_ensure_config(&fbl->main_fb,
508  {GPU_ATTACHMENT_LEAVE,
509  GPU_ATTACHMENT_LEAVE,
510  GPU_ATTACHMENT_NONE,
511  GPU_ATTACHMENT_NONE,
512  GPU_ATTACHMENT_NONE,
513  GPU_ATTACHMENT_NONE});
515 
517 
518  GPU_framebuffer_ensure_config(&fbl->main_fb,
519  {GPU_ATTACHMENT_LEAVE,
520  GPU_ATTACHMENT_LEAVE,
521  GPU_ATTACHMENT_TEXTURE(stl->effects->ssr_normal_input),
522  GPU_ATTACHMENT_TEXTURE(stl->effects->ssr_specrough_input),
523  GPU_ATTACHMENT_TEXTURE(stl->effects->sss_irradiance),
524  GPU_ATTACHMENT_TEXTURE(stl->effects->sss_radius),
525  GPU_ATTACHMENT_TEXTURE(stl->effects->sss_albedo)});
527 }
528 
529 void EEVEE_render_draw(EEVEE_Data *vedata, RenderEngine *engine, RenderLayer *rl, const rcti *rect)
530 {
531  const char *viewname = RE_GetActiveRenderView(engine->re);
532  EEVEE_PassList *psl = vedata->psl;
533  EEVEE_StorageList *stl = vedata->stl;
534  EEVEE_FramebufferList *fbl = vedata->fbl;
537 
538  /* Push instances attributes to the GPU. */
540 
541  /* Need to be called after DRW_render_instance_buffer_finish() */
542  /* Also we weed to have a correct FBO bound for DRW_curves_update */
545 
546  /* Sort transparents before the loop. */
548 
549  uint tot_sample = stl->g_data->render_sample_count_per_timestep;
550  uint render_samples = 0;
551 
552  /* SSR needs one iteration to start properly. */
554  tot_sample += 1;
555  }
556 
557  while (render_samples < tot_sample && !RE_engine_test_break(engine)) {
558  const float clear_col[4] = {0.0f, 0.0f, 0.0f, 0.0f};
559  float clear_depth = 1.0f;
560  uint clear_stencil = 0x00;
561  const uint primes[3] = {2, 3, 7};
562  double offset[3] = {0.0, 0.0, 0.0};
563  double r[3];
564 
565  if ((stl->effects->enabled_effects & EFFECT_SSR) && (render_samples == 1) &&
567  /* SSR needs one iteration to start properly.
568  * This iteration was done, reset to the original target sample count. */
569  render_samples--;
570  tot_sample--;
571  /* Reset sampling (and accumulation) after the first sample to avoid
572  * washed out first bounce for SSR. */
575  }
576  /* Don't print every samples as it can lead to bad performance. (see T59649) */
577  else if ((render_samples % 25) == 0 || (render_samples + 1) == tot_sample) {
578  char info[42];
579  BLI_snprintf(
580  info, sizeof(info), "Rendering %u / %u samples", render_samples + 1, tot_sample);
581  RE_engine_update_stats(engine, NULL, info);
582  }
583 
584  /* Copy previous persmat to UBO data */
586 
588  EEVEE_update_noise(psl, fbl, r);
591  EEVEE_materials_init(sldata, vedata, stl, fbl);
592 
593  /* Refresh Probes
594  * Shadows needs to be updated for correct probes */
595  EEVEE_shadows_update(sldata, vedata);
596  EEVEE_lightprobes_refresh(sldata, vedata);
597  EEVEE_lightprobes_refresh_planar(sldata, vedata);
598 
599  /* Refresh Shadows */
600  EEVEE_shadows_draw(sldata, vedata, stl->effects->taa_view);
601 
602  /* Set matrices. */
604 
605  /* Set ray type. */
607  sldata->common_data.ray_depth = 0.0f;
608  GPU_uniformbuf_update(sldata->common_ubo, &sldata->common_data);
609 
611  GPU_framebuffer_clear_color_depth_stencil(fbl->main_fb, clear_col, clear_depth, clear_stencil);
612  /* Depth prepass */
613  DRW_draw_pass(psl->depth_ps);
614  /* Create minmax texture */
615  EEVEE_create_minmax_buffer(vedata, dtxl->depth, -1);
616  EEVEE_occlusion_compute(sldata, vedata);
617  EEVEE_volumes_compute(sldata, vedata);
618  /* Shading pass */
622  EEVEE_subsurface_data_render(sldata, vedata);
623  /* Effects pre-transparency */
624  EEVEE_subsurface_compute(sldata, vedata);
625  EEVEE_reflection_compute(sldata, vedata);
626  EEVEE_refraction_compute(sldata, vedata);
627  /* Opaque refraction */
630  /* Result NORMAL */
631  eevee_render_result_normal(rl, viewname, rect, vedata, sldata);
632  /* Volumetrics Resolve Opaque */
633  EEVEE_volumes_resolve(sldata, vedata);
634  /* Subsurface output, Occlusion output, Mist output */
635  EEVEE_renderpasses_output_accumulate(sldata, vedata, false);
636  /* Transparent */
642  /* Result Z */
643  eevee_render_result_z(rl, viewname, rect, vedata, sldata);
644  /* Post Process */
645  EEVEE_draw_effects(sldata, vedata);
646 
647  /* XXX Seems to fix TDR issue with NVidia drivers on linux. */
648  GPU_finish();
649 
650  /* Perform render step between samples to allow
651  * flushing of freed GPUBackend resources. */
652  GPU_render_step();
653 
654  RE_engine_update_progress(engine, (float)(render_samples++) / (float)tot_sample);
655  }
656 }
657 
659  RenderEngine *engine,
660  RenderLayer *rl,
661  const rcti *rect)
662 {
663  const char *viewname = RE_GetActiveRenderView(engine->re);
665 
666  eevee_render_result_combined(rl, viewname, rect, vedata, sldata);
667  eevee_render_result_mist(rl, viewname, rect, vedata, sldata);
668  eevee_render_result_occlusion(rl, viewname, rect, vedata, sldata);
669  eevee_render_result_shadow(rl, viewname, rect, vedata, sldata);
670  eevee_render_result_diffuse_color(rl, viewname, rect, vedata, sldata);
671  eevee_render_result_diffuse_direct(rl, viewname, rect, vedata, sldata);
672  eevee_render_result_specular_color(rl, viewname, rect, vedata, sldata);
673  eevee_render_result_specular_direct(rl, viewname, rect, vedata, sldata);
674  eevee_render_result_emission(rl, viewname, rect, vedata, sldata);
675  eevee_render_result_environment(rl, viewname, rect, vedata, sldata);
676  eevee_render_result_bloom(rl, viewname, rect, vedata, sldata);
677  eevee_render_result_volume_light(rl, viewname, rect, vedata, sldata);
678  eevee_render_result_aovs(rl, viewname, rect, vedata, sldata);
679  eevee_render_result_cryptomatte(rl, viewname, rect, vedata, sldata);
680 }
681 
683 {
684  RE_engine_register_pass(engine, scene, view_layer, RE_PASSNAME_COMBINED, 4, "RGBA", SOCK_RGBA);
685 
686 #define CHECK_PASS_LEGACY(name, type, channels, chanid) \
687  if (view_layer->passflag & (SCE_PASS_##name)) { \
688  RE_engine_register_pass( \
689  engine, scene, view_layer, RE_PASSNAME_##name, channels, chanid, type); \
690  } \
691  ((void)0)
692 #define CHECK_PASS_EEVEE(name, type, channels, chanid) \
693  if (view_layer->eevee.render_passes & (EEVEE_RENDER_PASS_##name)) { \
694  RE_engine_register_pass( \
695  engine, scene, view_layer, RE_PASSNAME_##name, channels, chanid, type); \
696  } \
697  ((void)0)
698 
699  CHECK_PASS_LEGACY(Z, SOCK_FLOAT, 1, "Z");
700  CHECK_PASS_LEGACY(MIST, SOCK_FLOAT, 1, "Z");
702  CHECK_PASS_LEGACY(DIFFUSE_DIRECT, SOCK_RGBA, 3, "RGB");
703  CHECK_PASS_LEGACY(DIFFUSE_COLOR, SOCK_RGBA, 3, "RGB");
704  CHECK_PASS_LEGACY(GLOSSY_DIRECT, SOCK_RGBA, 3, "RGB");
705  CHECK_PASS_LEGACY(GLOSSY_COLOR, SOCK_RGBA, 3, "RGB");
706  CHECK_PASS_EEVEE(VOLUME_LIGHT, SOCK_RGBA, 3, "RGB");
707  CHECK_PASS_LEGACY(EMIT, SOCK_RGBA, 3, "RGB");
708  CHECK_PASS_LEGACY(ENVIRONMENT, SOCK_RGBA, 3, "RGB");
709  CHECK_PASS_LEGACY(SHADOW, SOCK_RGBA, 3, "RGB");
710  CHECK_PASS_LEGACY(AO, SOCK_RGBA, 3, "RGB");
711  CHECK_PASS_EEVEE(BLOOM, SOCK_RGBA, 3, "RGB");
712 
713  LISTBASE_FOREACH (ViewLayerAOV *, aov, &view_layer->aovs) {
714  if ((aov->flag & AOV_CONFLICT) != 0) {
715  continue;
716  }
717  switch (aov->type) {
718  case AOV_TYPE_COLOR:
719  RE_engine_register_pass(engine, scene, view_layer, aov->name, 4, "RGBA", SOCK_RGBA);
720  break;
721  case AOV_TYPE_VALUE:
722  RE_engine_register_pass(engine, scene, view_layer, aov->name, 1, "X", SOCK_FLOAT);
723  break;
724  default:
725  break;
726  }
727  }
728  EEVEE_cryptomatte_update_passes(engine, scene, view_layer);
729 
730 #undef CHECK_PASS_LEGACY
731 #undef CHECK_PASS_EEVEE
732 }
bool BKE_collection_has_object_recursive(struct Collection *collection, struct Object *ob)
Definition: collection.c:921
General operations, lookup, etc. for blender objects.
@ OB_VISIBLE_SELF
Definition: BKE_object.h:150
@ OB_VISIBLE_PARTICLES
Definition: BKE_object.h:151
#define LISTBASE_FOREACH(type, var, list)
Definition: BLI_listbase.h:336
MINLINE float max_ff(float a, float b)
MINLINE int max_ii(int a, int b)
bool invert_m4_m4(float R[4][4], const float A[4][4])
Definition: math_matrix.c:1287
void copy_m4_m4(float m1[4][4], const float m2[4][4])
Definition: math_matrix.c:77
MINLINE void copy_v4_fl4(float v[4], float x, float y, float z, float w)
MINLINE void madd_v2_v2v2fl(float r[2], const float a[2], const float b[2], float f)
MINLINE void copy_v2_v2(float r[2], const float a[2])
Random number functions.
void BLI_halton_3d(const unsigned int prime[3], double offset[3], int n, double *r)
Definition: rand.cc:311
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
Definition: BLI_rect.h:190
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
Definition: BLI_rect.h:186
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
unsigned int uint
Definition: BLI_sys_types.h:67
#define UNUSED(x)
#define ELEM(...)
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
struct Object * DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object)
struct Scene * DEG_get_evaluated_scene(const struct Depsgraph *graph)
@ EEVEE_RENDER_PASS_AO
@ EEVEE_RENDER_PASS_NORMAL
@ EEVEE_RENDER_PASS_AOV
@ EEVEE_RENDER_PASS_BLOOM
@ EEVEE_RENDER_PASS_CRYPTOMATTE
@ EEVEE_RENDER_PASS_Z
@ EEVEE_RENDER_PASS_MIST
@ EEVEE_RENDER_PASS_SHADOW
@ BASE_FROM_DUPLI
@ AOV_TYPE_COLOR
@ AOV_TYPE_VALUE
@ AOV_CONFLICT
@ SOCK_VECTOR
@ SOCK_FLOAT
@ SOCK_RGBA
Object is a sort of wrapper for general info.
@ OB_MBALL
@ OB_SURF
@ OB_LAMP
@ OB_MESH
@ OB_VOLUME
@ OB_CURVES
@ OB_LIGHTPROBE
#define RE_PASSNAME_COMBINED
#define RE_PASSNAME_BLOOM
#define RE_PASSNAME_NORMAL
#define RE_PASSNAME_SHADOW
#define RE_PASSNAME_MIST
#define RE_PASSNAME_AO
@ SCE_EEVEE_OVERSCAN
#define RE_PASSNAME_Z
@ DRW_TEX_FILTER
Definition: DRW_render.h:140
static AppView * view
int GPU_max_texture_size(void)
void GPU_render_step(void)
Definition: gpu_context.cc:202
struct GPUFrameBuffer GPUFrameBuffer
void GPU_framebuffer_bind(GPUFrameBuffer *fb)
void GPU_framebuffer_texture_detach(GPUFrameBuffer *fb, struct GPUTexture *tex)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
void GPU_finish(void)
Definition: gpu_state.cc:296
@ GPU_DATA_FLOAT
Definition: GPU_texture.h:171
@ GPU_DEPTH24_STENCIL8
Definition: GPU_texture.h:120
@ GPU_RGBA32F
Definition: GPU_texture.h:90
void GPU_uniformbuf_update(GPUUniformBuf *ubo, const void *data)
#define Z
Definition: GeomUtils.cpp:201
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 NORMAL
Scene scene
const Depsgraph * depsgraph
void DRW_curves_update(void)
Definition: draw_curves.cc:414
void DRW_render_viewport_size_set(const int size[2])
Definition: draw_manager.c:280
DefaultFramebufferList * DRW_viewport_framebuffer_list_get(void)
Definition: draw_manager.c:633
void DRW_render_instance_buffer_finish(void)
int DRW_object_visibility_in_active_context(const Object *ob)
Definition: draw_manager.c:209
const DRWContextState * DRW_context_state_get(void)
bool DRW_state_draw_background(void)
const float * DRW_viewport_size_get(void)
Definition: draw_manager.c:288
DefaultTextureList * DRW_viewport_texture_list_get(void)
Definition: draw_manager.c:638
void DRW_pass_sort_shgroup_z(DRWPass *pass)
DRWView * DRW_view_create(const float viewmat[4][4], const float winmat[4][4], const float(*culling_viewmat)[4], const float(*culling_winmat)[4], DRWCallVisibilityFn *visibility_fn)
void DRW_view_default_set(const DRWView *view)
void DRW_view_camtexco_set(DRWView *view, float texco[4])
void DRW_view_reset(void)
void DRW_draw_pass(DRWPass *pass)
void DRW_view_set_active(const DRWView *view)
void DRW_texture_ensure_fullscreen_2d(GPUTexture **tex, eGPUTextureFormat format, DRWTextureFlag flags)
static struct @318 g_data
void EEVEE_bloom_cache_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata)
Definition: eevee_bloom.c:151
void EEVEE_cryptomatte_particle_hair_cache_populate(EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata, Object *ob)
void EEVEE_cryptomatte_object_curves_cache_populate(EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata, Object *ob)
void EEVEE_cryptomatte_cache_populate(EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata, Object *ob)
void EEVEE_cryptomatte_cache_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata)
void EEVEE_cryptomatte_render_result(RenderLayer *rl, const char *viewname, const rcti *rect, EEVEE_Data *vedata, EEVEE_ViewLayerData *UNUSED(sldata))
void EEVEE_cryptomatte_update_passes(RenderEngine *engine, Scene *scene, ViewLayer *view_layer)
EEVEE_ViewLayerData * EEVEE_view_layer_data_ensure(void)
Definition: eevee_data.c:259
void EEVEE_depth_of_field_cache_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata)
void EEVEE_create_minmax_buffer(EEVEE_Data *vedata, GPUTexture *depth_src, int layer)
void EEVEE_effects_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_draw_effects(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_effects_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, Object *camera, const bool minimal)
Definition: eevee_effects.c:56
void eevee_id_update(void *vedata, ID *id)
Definition: eevee_engine.c:414
void EEVEE_lightprobes_refresh(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_lightprobes_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_lightprobes_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_lightprobes_cache_add(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, Object *ob)
void EEVEE_lightprobes_refresh_planar(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_lights_cache_add(EEVEE_ViewLayerData *sldata, Object *ob)
Definition: eevee_lights.c:200
void EEVEE_lights_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
Definition: eevee_lights.c:192
void EEVEE_update_noise(EEVEE_PassList *psl, EEVEE_FramebufferList *fbl, const double offsets[3])
void EEVEE_materials_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_materials_cache_populate(EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata, Object *ob, bool *cast_shadow)
void EEVEE_materials_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, EEVEE_StorageList *stl, EEVEE_FramebufferList *fbl)
void EEVEE_particle_hair_cache_populate(EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata, Object *ob, bool *cast_shadow)
void EEVEE_object_curves_cache_populate(EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata, Object *ob, bool *cast_shadow)
void EEVEE_motion_blur_cache_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata)
void EEVEE_occlusion_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_occlusion_compute(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_refraction_compute(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_shadows_update(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_renderpasses_output_accumulate(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, bool post_effect)
void EEVEE_volumes_set_jitter(EEVEE_ViewLayerData *sldata, uint current_sample)
Definition: eevee_volumes.c:48
void EEVEE_subsurface_compute(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_screen_raytrace_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_volumes_resolve(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_volumes_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_temporal_sampling_matrices_calc(EEVEE_EffectsInfo *effects, const double ht_point[2])
void EEVEE_reflection_compute(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_volumes_cache_object_add(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, struct Scene *scene, Object *ob)
void EEVEE_temporal_sampling_reset(EEVEE_Data *vedata)
void EEVEE_volumes_compute(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_renderpasses_init(EEVEE_Data *vedata)
void EEVEE_subsurface_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
#define EEVEE_RAY_CAMERA
void EEVEE_shadows_caster_register(EEVEE_ViewLayerData *sldata, struct Object *ob)
void EEVEE_shadows_init(EEVEE_ViewLayerData *sldata)
Definition: eevee_shadows.c:26
@ EFFECT_BLOOM
@ EFFECT_SSR
void EEVEE_temporal_sampling_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_shadows_draw(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, struct DRWView *view)
void EEVEE_renderpasses_postprocess(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, eViewLayerEEVEEPassType renderpass_type, int aov_index)
void EEVEE_subsurface_data_render(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
static void eevee_render_result_aovs(RenderLayer *rl, const char *viewname, const rcti *rect, EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata)
Definition: eevee_render.c:457
static void eevee_render_result_emission(RenderLayer *rl, const char *viewname, const rcti *rect, EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata)
Definition: eevee_render.c:430
static void eevee_render_result_specular_color(RenderLayer *rl, const char *viewname, const rcti *rect, EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata)
Definition: eevee_render.c:412
static void eevee_render_result_volume_light(RenderLayer *rl, const char *viewname, const rcti *rect, EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata)
Definition: eevee_render.c:448
static void eevee_render_result_combined(RenderLayer *rl, const char *viewname, const rcti *rect, EEVEE_Data *vedata, EEVEE_ViewLayerData *UNUSED(sldata))
Definition: eevee_render.c:280
void EEVEE_render_draw(EEVEE_Data *vedata, RenderEngine *engine, RenderLayer *rl, const rcti *rect)
Definition: eevee_render.c:529
static void eevee_render_draw_background(EEVEE_Data *vedata)
Definition: eevee_render.c:499
static void eevee_render_result_mist(RenderLayer *rl, const char *viewname, const rcti *rect, EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata)
Definition: eevee_render.c:330
void EEVEE_render_update_passes(RenderEngine *engine, Scene *scene, ViewLayer *view_layer)
Definition: eevee_render.c:682
static void eevee_render_result_diffuse_direct(RenderLayer *rl, const char *viewname, const rcti *rect, EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata)
Definition: eevee_render.c:403
#define CHECK_PASS_EEVEE(name, type, channels, chanid)
void EEVEE_render_modules_init(EEVEE_Data *vedata, RenderEngine *engine, struct Depsgraph *depsgraph)
Definition: eevee_render.c:120
void EEVEE_render_cache(void *vedata, struct Object *ob, struct RenderEngine *engine, struct Depsgraph *depsgraph)
Definition: eevee_render.c:182
void EEVEE_render_view_sync(EEVEE_Data *vedata, RenderEngine *engine, struct Depsgraph *depsgraph)
Definition: eevee_render.c:141
#define EEVEE_RENDER_RESULT_MATERIAL_PASS(pass_name, eevee_pass_type)
Definition: eevee_render.c:387
#define CHECK_PASS_LEGACY(name, type, channels, chanid)
static void eevee_render_result_diffuse_color(RenderLayer *rl, const char *viewname, const rcti *rect, EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata)
Definition: eevee_render.c:394
static void eevee_render_result_shadow(RenderLayer *rl, const char *viewname, const rcti *rect, EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata)
Definition: eevee_render.c:343
void EEVEE_render_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
Definition: eevee_render.c:164
static void eevee_render_result_environment(RenderLayer *rl, const char *viewname, const rcti *rect, EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata)
Definition: eevee_render.c:439
static void eevee_render_result_occlusion(RenderLayer *rl, const char *viewname, const rcti *rect, EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata)
Definition: eevee_render.c:356
bool EEVEE_render_init(EEVEE_Data *ved, RenderEngine *engine, struct Depsgraph *depsgraph)
Definition: eevee_render.c:35
static void eevee_render_color_result(RenderLayer *rl, const char *viewname, const rcti *rect, const char *render_pass_name, int num_channels, GPUFrameBuffer *framebuffer, EEVEE_Data *vedata)
Definition: eevee_render.c:256
void EEVEE_render_read_result(EEVEE_Data *vedata, RenderEngine *engine, RenderLayer *rl, const rcti *rect)
Definition: eevee_render.c:658
static void eevee_render_result_normal(RenderLayer *rl, const char *viewname, const rcti *rect, EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata)
Definition: eevee_render.c:290
static void eevee_render_result_bloom(RenderLayer *rl, const char *viewname, const rcti *rect, EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata)
Definition: eevee_render.c:369
static void eevee_render_result_cryptomatte(RenderLayer *rl, const char *viewname, const rcti *rect, EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata)
Definition: eevee_render.c:488
static void eevee_render_result_z(RenderLayer *rl, const char *viewname, const rcti *rect, EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata)
Definition: eevee_render.c:310
static void eevee_render_result_specular_direct(RenderLayer *rl, const char *viewname, const rcti *rect, EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata)
Definition: eevee_render.c:421
bool RE_engine_test_break(RenderEngine *engine)
Definition: engine.c:488
void RE_engine_register_pass(struct RenderEngine *engine, struct Scene *scene, struct ViewLayer *view_layer, const char *name, int channels, const char *chanid, eNodeSocketDatatype type)
Definition: engine.c:1171
void RE_engine_update_stats(RenderEngine *engine, const char *stats, const char *info)
Definition: engine.c:501
void RE_engine_set_error_message(RenderEngine *engine, const char *msg)
Definition: engine.c:560
void RE_engine_update_progress(RenderEngine *engine, float progress)
Definition: engine.c:528
void GPU_framebuffer_read_color(GPUFrameBuffer *gpu_fb, int x, int y, int w, int h, int channels, int slot, eGPUDataFormat format, void *data)
void GPU_framebuffer_texture_attach(GPUFrameBuffer *fb, GPUTexture *tex, int slot, int mip)
void RE_GetCameraWindowWithOverscan(const struct Render *re, float overscan, float r_winmat[4][4])
Definition: initrender.c:187
void RE_GetCameraModelMatrix(const Render *re, const struct Object *camera, float r_modelmat[4][4])
Definition: initrender.c:205
struct Object * RE_GetCamera(Render *re)
Definition: initrender.c:150
void RE_GetCameraWindow(struct Render *re, const struct Object *camera, float r_winmat[4][4])
Definition: initrender.c:181
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
void *(* MEM_callocN)(size_t len, const char *str)
Definition: mallocn.c:31
#define G(x, y, z)
RenderPass * RE_pass_find_by_name(RenderLayer *rl, const char *name, const char *viewname)
Definition: pipeline.c:2591
const char * RE_GetActiveRenderView(Render *re)
Definition: pipeline.c:1671
struct ViewLayer * view_layer
Definition: DRW_render.h:980
struct GPUFrameBuffer * default_fb
struct GPUTexture * depth
EEVEE_TextureList * txl
EEVEE_StorageList * stl
EEVEE_PassList * psl
EEVEE_FramebufferList * fbl
bool ssr_was_valid_double_buffer
EEVEE_EffectsFlag enabled_effects
float prev_persmat[4][4]
struct GPUFrameBuffer * final_fb
struct DRWView * taa_view
struct GPUFrameBuffer * main_fb
struct GPUFrameBuffer * main_color_fb
struct GPUFrameBuffer * renderpass_fb
struct Collection * collection
EEVEE_LightProbeVisTest vis_data
struct DRWPass * transparent_pass
struct DRWPass * depth_refract_ps
struct DRWPass * depth_ps
struct DRWPass * material_refract_ps
struct DRWPass * material_ps
struct DRWPass * background_ps
eViewLayerEEVEEPassType render_passes
int render_sample_count_per_timestep
struct EEVEE_PrivateData * g_data
struct EEVEE_EffectsInfo * effects
struct GPUTexture * color
struct EEVEE_CommonUniformBuffer common_data
struct GPUUniformBuf * common_ubo
struct EEVEE_LightProbesInfo * probes
char name[66]
Definition: DNA_ID.h:378
short base_flag
struct Render * re
Definition: RE_engine.h:135
float * rect
Definition: RE_pipeline.h:67
struct SceneEEVEE eevee
ListBase aovs
char name[64]
int ymin
Definition: DNA_vec_types.h:64
int xmin
Definition: DNA_vec_types.h:63