Blender  V2.93
eevee_private.h
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 2016, Blender Foundation.
17  */
18 
23 #pragma once
24 
25 #include "DRW_render.h"
26 
27 #include "BLI_bitmap.h"
28 
29 #include "DNA_lightprobe_types.h"
30 
31 #include "GPU_viewport.h"
32 
33 #include "BKE_camera.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
40 struct GPUFrameBuffer;
41 struct Object;
42 struct RenderLayer;
43 
45 
46 /* Minimum UBO is 16384 bytes */
47 #define MAX_PROBE 128 /* TODO : find size by dividing UBO max size by probe data size */
48 #define MAX_GRID 64 /* TODO : find size by dividing UBO max size by grid data size */
49 #define MAX_PLANAR 16 /* TODO : find size by dividing UBO max size by grid data size */
50 #define MAX_LIGHT 128 /* TODO : find size by dividing UBO max size by light data size */
51 #define MAX_CASCADE_NUM 4
52 #define MAX_SHADOW 128 /* TODO : Make this depends on GL_MAX_ARRAY_TEXTURE_LAYERS */
53 #define MAX_SHADOW_CASCADE 8
54 #define MAX_SHADOW_CUBE (MAX_SHADOW - MAX_CASCADE_NUM * MAX_SHADOW_CASCADE)
55 #define MAX_BLOOM_STEP 16
56 #define MAX_AOVS 64
57 
58 /* Special value chosen to not be altered by depth of field sample count. */
59 #define TAA_MAX_SAMPLE 10000926
60 
61 // #define DEBUG_SHADOW_DISTRIBUTION
62 
63 /* Only define one of these. */
64 // #define IRRADIANCE_SH_L2
65 #define IRRADIANCE_HL2
66 
67 #if defined(IRRADIANCE_SH_L2)
68 # define SHADER_IRRADIANCE "#define IRRADIANCE_SH_L2\n"
69 #elif defined(IRRADIANCE_HL2)
70 # define SHADER_IRRADIANCE "#define IRRADIANCE_HL2\n"
71 #endif
72 
73 /* Macro causes over indentation. */
74 /* clang-format off */
75 #define SHADER_DEFINES \
76  "#define EEVEE_ENGINE\n" \
77  "#define MAX_PROBE " STRINGIFY(MAX_PROBE) "\n" \
78  "#define MAX_GRID " STRINGIFY(MAX_GRID) "\n" \
79  "#define MAX_PLANAR " STRINGIFY(MAX_PLANAR) "\n" \
80  "#define MAX_LIGHT " STRINGIFY(MAX_LIGHT) "\n" \
81  "#define MAX_SHADOW " STRINGIFY(MAX_SHADOW) "\n" \
82  "#define MAX_SHADOW_CUBE " STRINGIFY(MAX_SHADOW_CUBE) "\n" \
83  "#define MAX_SHADOW_CASCADE " STRINGIFY(MAX_SHADOW_CASCADE) "\n" \
84  "#define MAX_CASCADE_NUM " STRINGIFY(MAX_CASCADE_NUM) "\n" \
85  SHADER_IRRADIANCE
86 /* clang-format on */
87 
88 #define EEVEE_PROBE_MAX min_ii(MAX_PROBE, GPU_max_texture_layers() / 6)
89 #define EEVEE_VELOCITY_TILE_SIZE 32
90 #define USE_VOLUME_OPTI (GPU_shader_image_load_store_support())
91 
92 #define SWAP_DOUBLE_BUFFERS() \
93  { \
94  if (effects->swap_double_buffer) { \
95  SWAP(struct GPUFrameBuffer *, fbl->main_fb, fbl->double_buffer_fb); \
96  SWAP(struct GPUFrameBuffer *, fbl->main_color_fb, fbl->double_buffer_color_fb); \
97  SWAP(GPUTexture *, txl->color, txl->color_double_buffer); \
98  effects->swap_double_buffer = false; \
99  } \
100  } \
101  ((void)0)
102 
103 #define SWAP_BUFFERS() \
104  { \
105  if (effects->target_buffer == fbl->effect_color_fb) { \
106  SWAP_DOUBLE_BUFFERS(); \
107  effects->source_buffer = txl->color_post; \
108  effects->target_buffer = fbl->main_color_fb; \
109  } \
110  else { \
111  SWAP_DOUBLE_BUFFERS(); \
112  effects->source_buffer = txl->color; \
113  effects->target_buffer = fbl->effect_color_fb; \
114  } \
115  } \
116  ((void)0)
117 
118 #define SWAP_BUFFERS_TAA() \
119  { \
120  if (effects->target_buffer == fbl->effect_color_fb) { \
121  SWAP(struct GPUFrameBuffer *, fbl->effect_fb, fbl->taa_history_fb); \
122  SWAP(struct GPUFrameBuffer *, fbl->effect_color_fb, fbl->taa_history_color_fb); \
123  SWAP(GPUTexture *, txl->color_post, txl->taa_history); \
124  effects->source_buffer = txl->taa_history; \
125  effects->target_buffer = fbl->effect_color_fb; \
126  } \
127  else { \
128  SWAP(struct GPUFrameBuffer *, fbl->main_fb, fbl->taa_history_fb); \
129  SWAP(struct GPUFrameBuffer *, fbl->main_color_fb, fbl->taa_history_color_fb); \
130  SWAP(GPUTexture *, txl->color, txl->taa_history); \
131  effects->source_buffer = txl->taa_history; \
132  effects->target_buffer = fbl->main_color_fb; \
133  } \
134  } \
135  ((void)0)
136 
138 {
139  /* Only show the HDRI Preview in Shading Preview in the Viewport. */
140  if (v3d == NULL || v3d->shading.type != OB_MATERIAL) {
141  return false;
142  }
143 
144  /* Only show the HDRI Preview when viewing the Combined render pass */
145  if (v3d->shading.render_pass != SCE_PASS_COMBINED) {
146  return false;
147  }
148 
149  return ((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) && (v3d->overlay.flag & V3D_OVERLAY_LOOK_DEV);
150 }
151 
152 #define USE_SCENE_LIGHT(v3d) \
153  ((!v3d) || \
154  ((v3d->shading.type == OB_MATERIAL) && (v3d->shading.flag & V3D_SHADING_SCENE_LIGHTS)) || \
155  ((v3d->shading.type == OB_RENDER) && (v3d->shading.flag & V3D_SHADING_SCENE_LIGHTS_RENDER)))
156 #define LOOK_DEV_STUDIO_LIGHT_ENABLED(v3d) \
157  ((v3d) && (((v3d->shading.type == OB_MATERIAL) && \
158  ((v3d->shading.flag & V3D_SHADING_SCENE_WORLD) == 0)) || \
159  ((v3d->shading.type == OB_RENDER) && \
160  ((v3d->shading.flag & V3D_SHADING_SCENE_WORLD_RENDER) == 0))))
161 
162 #define MIN_CUBE_LOD_LEVEL 3
163 #define MAX_SCREEN_BUFFERS_LOD_LEVEL 6
164 
165 /* All the renderpasses that use the GPUMaterial for accumulation */
166 #define EEVEE_RENDERPASSES_MATERIAL \
167  (EEVEE_RENDER_PASS_EMIT | EEVEE_RENDER_PASS_DIFFUSE_COLOR | EEVEE_RENDER_PASS_DIFFUSE_LIGHT | \
168  EEVEE_RENDER_PASS_SPECULAR_COLOR | EEVEE_RENDER_PASS_SPECULAR_LIGHT | \
169  EEVEE_RENDER_PASS_ENVIRONMENT | EEVEE_RENDER_PASS_AOV)
170 #define EEVEE_AOV_HASH_ALL -1
171 #define EEVEE_AOV_HASH_COLOR_TYPE_MASK 1
172 #define MAX_CRYPTOMATTE_LAYERS 3
173 
174 /* Material shader variations */
175 enum {
176  VAR_MAT_MESH = (1 << 0),
177  VAR_MAT_VOLUME = (1 << 1),
178  VAR_MAT_HAIR = (1 << 2),
179  /* VAR_MAT_PROBE = (1 << 3), UNUSED */
180  VAR_MAT_BLEND = (1 << 4),
181  VAR_MAT_LOOKDEV = (1 << 5),
182  VAR_MAT_HOLDOUT = (1 << 6),
183  VAR_MAT_HASH = (1 << 7),
184  VAR_MAT_DEPTH = (1 << 8),
185  VAR_MAT_REFRACT = (1 << 9),
186  VAR_WORLD_BACKGROUND = (1 << 10),
187  VAR_WORLD_PROBE = (1 << 11),
188  VAR_WORLD_VOLUME = (1 << 12),
189  VAR_DEFAULT = (1 << 13),
190 };
191 
192 /* Material shader cache keys */
193 enum {
194  /* HACK: This assumes the struct GPUShader will never be smaller than our variations.
195  * This allow us to only keep one ghash and avoid bigger keys comparisons/hashing.
196  * We combine the GPUShader pointer with the key. */
197  KEY_CULL = (1 << 0),
198  KEY_REFRACT = (1 << 1),
199  KEY_HAIR = (1 << 2),
200  KEY_SHADOW = (1 << 3),
201 };
202 
203 /* DOF Gather pass shader variations */
204 typedef enum EEVEE_DofGatherPass {
208 
211 
212 #define DOF_TILE_DIVISOR 16
213 #define DOF_BOKEH_LUT_SIZE 32
214 #define DOF_GATHER_RING_COUNT 5
215 #define DOF_DILATE_RING_COUNT 3
216 #define DOF_FAST_GATHER_COC_ERROR 0.05
217 
218 #define DOF_SHADER_DEFINES \
219  "#define DOF_TILE_DIVISOR " STRINGIFY(DOF_TILE_DIVISOR) "\n" \
220  "#define DOF_BOKEH_LUT_SIZE " STRINGIFY(DOF_BOKEH_LUT_SIZE) "\n" \
221  "#define DOF_GATHER_RING_COUNT " STRINGIFY(DOF_GATHER_RING_COUNT) "\n" \
222  "#define DOF_DILATE_RING_COUNT " STRINGIFY(DOF_DILATE_RING_COUNT) "\n" \
223  "#define DOF_FAST_GATHER_COC_ERROR " STRINGIFY(DOF_FAST_GATHER_COC_ERROR) "\n"
224 
225 /* ************ PROBE UBO ************* */
226 
227 /* They are the same struct as their Cache siblings.
228  * typedef'ing just to keep the naming consistent with
229  * other eevee types. */
232 
233 typedef struct EEVEE_PlanarReflection {
234  float plane_equation[4];
240  float reflectionmat[4][4]; /* Used for sampling the texture. */
241  float mtx[4][4]; /* Not used in shader. TODO move elsewhere. */
243 
244 /* --------------------------------------- */
245 
246 typedef struct EEVEE_BoundBox {
247  float center[3], halfdim[3];
249 
250 typedef struct EEVEE_PassList {
251  /* Shadows */
254 
255  /* Probes */
263 
264  /* Effects */
313 
314  /* HiZ */
318 
319  /* Renderpass Accumulation. */
323 
324  struct DRWPass *depth_ps;
345 
346 typedef struct EEVEE_FramebufferList {
347  /* Effects */
391 
393 
396 
408 
409 typedef struct EEVEE_TextureList {
410  /* Effects */
411  struct GPUTexture *color_post; /* R16_G16_B16 */
427  /* Could not be pool texture because of mipmapping. */
430 
441 
444 
447 
450 
452 
453  struct GPUTexture *color; /* R16_G16_B16 */
457 
458 typedef struct EEVEE_StorageList {
459  /* Effects */
461 
463 
469 
470 /* ************ RENDERPASS UBO ************* */
471 typedef struct EEVEE_RenderPassData {
481  int _pad[3];
483 
484 /* ************ LIGHT UBO ************* */
485 typedef struct EEVEE_Light {
486  float position[3], invsqrdist;
489  float rightvec[3], sizex;
490  float upvec[3], sizey;
494 
495 /* Special type for elliptic area lights, matches lamps_lib.glsl */
496 #define LAMPTYPE_AREA_ELLIPSE 100.0f
497 
498 typedef struct EEVEE_Shadow {
502 
503 typedef struct EEVEE_ShadowCube {
504  float shadowmat[4][4];
505  float position[3], _pad0[1];
507 
508 typedef struct EEVEE_ShadowCascade {
509  /* World->Light->NDC->Tex : used for sampling the shadow map. */
511  float split_start[4];
512  float split_end[4];
513  float shadow_vec[3], tex_id;
515 
517  /* World->Light->NDC : used for rendering the shadow map. */
518  float projmat[MAX_CASCADE_NUM][4][4];
519  float viewmat[4][4], viewinv[4][4];
527 
533 
537  16384,
538  "Shadow UBO is too big!!!")
539 
540 typedef struct EEVEE_ShadowCasterBuffer {
541  struct EEVEE_BoundBox *bbox;
543  uint alloc_count;
544  uint count;
546 
547 /* ************ LIGHT DATA ************* */
548 typedef struct EEVEE_LightsInfo {
555  /* UBO Storage : data used by UBO */
560  /* Additional rendering info for cascade. */
562  /* Back index in light_data. */
565  /* Update bitmap. */
567  /* Lights tracking */
568  struct BoundSphere shadow_bounds[MAX_LIGHT]; /* Tightly packed light bounds */
569  /* List of bbox and update bitmap. Double buffered. */
571  /* AABB of all shadow casters combined. */
572  struct {
573  float min[3], max[3];
576 
577 /* ************ PROBE DATA ************* */
578 typedef struct EEVEE_LightProbeVisTest {
579  struct Collection *collection; /* Skip test if NULL */
580  bool invert;
581  bool cached; /* Reuse last test results */
583 
584 typedef struct EEVEE_LightProbesInfo {
588  int total_irradiance_samples; /* Total for all grids */
594  /* Update */
597  /* For rendering probes */
598  float probemat[6][4][4];
599  int layer;
600  float texel_size;
602  float samples_len;
603  float near_clip;
604  float far_clip;
605  float roughness;
606  float firefly_fac;
607  float lodfactor;
612  int shres;
614  /* UBO Storage : data used by UBO */
618  /* Probe Visibility Collection */
621 
622 /* EEVEE_LightProbesInfo->update_flag */
623 enum {
624  PROBE_UPDATE_CUBE = (1 << 0),
625  PROBE_UPDATE_GRID = (1 << 1),
626  PROBE_UPDATE_ALL = 0xFFFFFF,
627 };
628 
629 /* ************** MOTION BLUR ************ */
630 
631 #define MB_PREV 0
632 #define MB_NEXT 1
633 #define MB_CURR 2
634 
635 typedef struct EEVEE_MotionBlurData {
636  struct GHash *object;
637  struct GHash *geom;
638  struct {
639  float viewmat[4][4];
640  float persmat[4][4];
641  float persinv[4][4];
642  } camera[3];
645 
646 typedef struct EEVEE_ObjectKey {
648  struct Object *ob;
650  struct Object *parent;
652  int id[8]; /* MAX_DUPLI_RECUR */
654 
655 typedef struct EEVEE_ObjectMotionData {
656  float obmat[3][4][4];
658 
659 typedef enum eEEVEEMotionData {
663 
664 typedef struct EEVEE_HairMotionData {
669  int psys_len;
670  struct {
671  struct GPUVertBuf *hair_pos[2]; /* Position buffer for time = t +/- step. */
672  struct GPUTexture *hair_pos_tx[2]; /* Buffer Texture of the corresponding VBO. */
673  } psys[0];
675 
676 typedef struct EEVEE_GeometryMotionData {
681 
682  struct GPUBatch *batch; /* Batch for time = t. */
683  struct GPUVertBuf *vbo[2]; /* Vbo for time = t +/- step. */
685 
686 /* ************ EFFECTS DATA ************* */
687 
688 typedef enum EEVEE_EffectsFlag {
689  EFFECT_MOTION_BLUR = (1 << 0),
690  EFFECT_BLOOM = (1 << 1),
691  EFFECT_DOF = (1 << 2),
692  EFFECT_VOLUMETRIC = (1 << 3),
693  EFFECT_SSR = (1 << 4),
694  EFFECT_DOUBLE_BUFFER = (1 << 5), /* Not really an effect but a feature */
695  EFFECT_REFRACT = (1 << 6),
696  EFFECT_GTAO = (1 << 7),
697  EFFECT_TAA = (1 << 8),
698  EFFECT_POST_BUFFER = (1 << 9), /* Not really an effect but a feature */
699  EFFECT_NORMAL_BUFFER = (1 << 10), /* Not really an effect but a feature */
700  EFFECT_RADIANCE_BUFFER = (1 << 10), /* Not really an effect but a feature */
701  EFFECT_SSS = (1 << 11),
702  EFFECT_VELOCITY_BUFFER = (1 << 12), /* Not really an effect but a feature */
703  EFFECT_TAA_REPROJECT = (1 << 13), /* should be mutually exclusive with EFFECT_TAA */
704  EFFECT_DEPTH_DOUBLE_BUFFER = (1 << 14), /* Not really an effect but a feature */
706 
707 typedef struct EEVEE_EffectsInfo {
710  /* SSSS */
713  struct GPUTexture *sss_irradiance; /* Textures from pool */
718  /* Volumetrics */
723  /* SSR */
727  struct GPUTexture *ssr_normal_input; /* Textures from pool */
731  /* Temporal Anti Aliasing */
736  float taa_alpha;
740  float prev_drw_persmat[4][4]; /* Used for checking view validity and reprojection. */
741  struct DRWView *taa_view;
742  /* Ambient Occlusion */
743  struct GPUTexture *gtao_horizons; /* Textures from pool */
744  struct GPUTexture *gtao_horizons_renderpass; /* Texture when rendering render pass */
746  /* Motion Blur */
747  float current_ndc_to_world[4][4];
748  float current_world_to_ndc[4][4];
750  float past_world_to_ndc[4][4];
751  float past_world_to_view[4][4];
754  char motion_blur_step; /* Which step we are evaluating. */
755  int motion_blur_max; /* Maximum distance in pixels a motion-blurred pixel can cover. */
756  float motion_blur_near_far[2]; /* Camera near/far clip distances (positive). */
758  /* TODO(fclem): Only used in render mode for now.
759  * This is because we are missing a per scene persistent place to hold this. */
761  /* Velocity Pass */
762  struct GPUTexture *velocity_tx; /* Texture from pool */
765  /* Depth Of Field */
784  struct GPUTexture *dof_bg_color_tx; /* All textures from pool... */
803  struct GPUTexture *dof_reduce_input_coc_tx; /* Just references to actual textures. */
805  /* Other */
806  float prev_persmat[4][4];
807  /* Size used by all fullscreen buffers using mipmaps. */
808  int hiz_size[2];
809  /* Lookdev */
812  int anchor[2];
814  /* Bloom */
817  float blit_texel_size[2];
819  float bloom_color[3];
820  float bloom_clamp;
824  struct GPUTexture *bloom_blit; /* Textures from pool */
827  struct GPUTexture *unf_source_buffer; /* pointer copy */
828  struct GPUTexture *unf_base_buffer; /* pointer copy */
829  /* Not alloced, just a copy of a *GPUtexture in EEVEE_TextureList. */
830  struct GPUTexture *source_buffer; /* latest updated texture */
831  struct GPUFrameBuffer *target_buffer; /* next target to render to */
832  struct GPUTexture *final_tx; /* Final color to transform to display color space. */
833  struct GPUFrameBuffer *final_fb; /* Frame-buffer with final_tx as attachment. */
835 
836 /* ***************** COMMON DATA **************** */
837 
838 /* Common uniform buffer containing all "constant" data over the whole drawing pipeline. */
839 /* !! CAUTION !!
840  * - [i]vec3 need to be padded to [i]vec4 (even in ubo declaration).
841  * - Make sure that [i]vec4 start at a multiple of 16 bytes.
842  * - Arrays of vec2/vec3 are padded as arrays of vec4.
843  * - sizeof(bool) == sizeof(int) in GLSL so use int in C */
845  float prev_persmat[4][4]; /* mat4 */
846  float hiz_uv_scale[2], ssr_uv_scale[2]; /* vec4 */
847  /* Ambient Occlusion */
848  /* -- 16 byte aligned -- */
849  float ao_dist, pad1, ao_factor, pad2; /* vec4 */
851  /* Volumetric */
852  /* -- 16 byte aligned -- */
853  int vol_tex_size[3], pad3; /* ivec3 */
854  float vol_depth_param[3], pad4; /* vec3 */
855  float vol_inv_tex_size[3], pad5; /* vec3 */
856  float vol_jitter[3], pad6; /* vec3 */
857  float vol_coord_scale[4]; /* vec4 */
858  /* -- 16 byte aligned -- */
859  float vol_history_alpha; /* float */
860  float vol_shadow_steps; /* float */
861  int vol_use_lights; /* bool */
862  int vol_use_soft_shadows; /* bool */
863  /* Screen Space Reflections */
864  /* -- 16 byte aligned -- */
865  float ssr_quality, ssr_thickness, ssr_pixelsize[2]; /* vec4 */
866  float ssr_border_fac; /* float */
867  float ssr_max_roughness; /* float */
868  float ssr_firefly_fac; /* float */
869  float ssr_brdf_bias; /* float */
870  int ssr_toggle; /* bool */
871  int ssrefract_toggle; /* bool */
872  /* SubSurface Scattering */
873  float sss_jitter_threshold; /* float */
874  int sss_toggle; /* bool */
875  /* Specular */
876  int spec_toggle; /* bool */
877  /* Lights */
878  int la_num_light; /* int */
879  /* Probes */
880  int prb_num_planar; /* int */
881  int prb_num_render_cube; /* int */
882  int prb_num_render_grid; /* int */
883  int prb_irradiance_vis_size; /* int */
884  float prb_irradiance_smooth; /* float */
885  float prb_lod_cube_max; /* float */
886  /* Misc */
887  int ray_type; /* int */
888  float ray_depth; /* float */
889  float alpha_hash_offset; /* float */
890  float alpha_hash_scale; /* float */
891  float pad7; /* float */
892  float pad8; /* float */
893  float pad9; /* float */
894  float pad10; /* float */
896 
898 
899 /* ray_type (keep in sync with rayType) */
900 #define EEVEE_RAY_CAMERA 0
901 #define EEVEE_RAY_SHADOW 1
902 #define EEVEE_RAY_DIFFUSE 2
903 #define EEVEE_RAY_GLOSSY 3
904 
905 /* ************** SCENE LAYER DATA ************** */
906 typedef struct EEVEE_ViewLayerData {
907  /* Lights */
909 
913 
915 
918 
920 
921  /* Probes */
923 
927 
928  /* Material Render passes */
929  struct {
939 
940  /* Common Uniform Buffer */
943 
945 
948 
949 /* ************ OBJECT DATA ************ */
950 
951 /* These are the structs stored inside Objects.
952  * It works even if the object is in multiple layers
953  * because we don't get the same "Object *" for each layer. */
954 typedef struct EEVEE_LightEngineData {
956 
959 
962 
965 
966 typedef struct EEVEE_ObjectEngineData {
968 
969  Object *ob; /* self reference */
972 
977 
978 typedef struct EEVEE_WorldEngineData {
981 
982 typedef struct EEVEE_CryptomatteSample {
983  float hash;
984  float weight;
986 
987 /* *********************************** */
988 
989 typedef struct EEVEE_Data {
990  void *engine_type;
995  char info[GPU_INFO_SIZE];
997 
998 typedef struct EEVEE_PrivateData {
1003  float background_alpha; /* TODO find a better place for this. */
1004  /* Chosen lightcache: can come from Lookdev or the viewlayer. */
1006  /* For planar probes */
1008  /* For double buffering */
1012  /* Render Matrices */
1013  float studiolight_matrix[3][3];
1015  float camtexcofac[4];
1016  float size_orig[2];
1017 
1018  /* Cached original camera when rendering for motion blur (see T79637). */
1020 
1021  /* Mist Settings */
1023 
1024  /* Color Management */
1026 
1027  /* Compiling shaders count. This is to track if a shader has finished compiling. */
1030 
1031  /* LookDev Settings */
1038 
1039  /* Renderpasses */
1040  /* Bitmask containing the active render_passes */
1048 
1049  /* Uniform references that are referenced inside the `renderpass_pass`. They are updated
1050  * to reuse the drawing pass and the shading group. */
1058  /* Renderpass ubo reference used by material pass. */
1061  struct DRWView *cube_views[6];
1063  struct DRWView *bake_views[6];
1065  struct DRWView *world_views[6];
1068 
1071 } EEVEE_PrivateData; /* Transient data */
1072 
1073 /* eevee_data.c */
1083  Object *ob,
1084  bool hair);
1086  Object *ob);
1094 
1095 void eevee_id_update(void *vedata, ID *id);
1096 
1097 /* eevee_materials.c */
1098 struct GPUTexture *EEVEE_materials_get_util_tex(void); /* XXX */
1100  EEVEE_Data *vedata,
1101  EEVEE_StorageList *stl,
1102  EEVEE_FramebufferList *fbl);
1105  EEVEE_ViewLayerData *sldata,
1106  Object *ob,
1107  bool *cast_shadow);
1109  EEVEE_ViewLayerData *sldata,
1110  Object *ob,
1111  bool *cast_shadow);
1113  EEVEE_ViewLayerData *sldata,
1114  Object *ob,
1115  bool *cast_shadow);
1117 void EEVEE_materials_free(void);
1118 void EEVEE_update_noise(EEVEE_PassList *psl, EEVEE_FramebufferList *fbl, const double offsets[3]);
1120 void EEVEE_material_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, uint tot_samples);
1123  struct GPUMaterial *gpumat,
1124  EEVEE_ViewLayerData *sldata,
1125  EEVEE_Data *vedata,
1126  const int *ssr_id,
1127  const float *refract_depth,
1128  bool use_ssrefraction,
1129  bool use_alpha_blend);
1130 /* eevee_lights.c */
1131 void eevee_light_matrix_get(const EEVEE_Light *evli, float r_mat[4][4]);
1133 void EEVEE_lights_cache_add(EEVEE_ViewLayerData *sldata, struct Object *ob);
1135 
1136 /* eevee_shadows.c */
1137 void eevee_contact_shadow_setup(const Light *la, EEVEE_Shadow *evsh);
1140 void EEVEE_shadows_caster_register(EEVEE_ViewLayerData *sldata, struct Object *ob);
1141 void EEVEE_shadows_update(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata);
1142 void EEVEE_shadows_cube_add(EEVEE_LightsInfo *linfo, EEVEE_Light *evli, struct Object *ob);
1143 bool EEVEE_shadows_cube_setup(EEVEE_LightsInfo *linfo, const EEVEE_Light *evli, int sample_ofs);
1144 void EEVEE_shadows_cascade_add(EEVEE_LightsInfo *linfo, EEVEE_Light *evli, struct Object *ob);
1145 void EEVEE_shadows_draw(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, struct DRWView *view);
1146 void EEVEE_shadows_draw_cubemap(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, int cube_index);
1148  EEVEE_Data *vedata,
1149  DRWView *view,
1150  int cascade_index);
1151 void EEVEE_shadow_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, uint tot_samples);
1153 
1154 /* eevee_sampling.c */
1155 void EEVEE_sample_ball(int sample_ofs, float radius, float rsample[3]);
1156 void EEVEE_sample_rectangle(int sample_ofs,
1157  const float x_axis[3],
1158  const float y_axis[3],
1159  float size_x,
1160  float size_y,
1161  float rsample[3]);
1162 void EEVEE_sample_ellipse(int sample_ofs,
1163  const float x_axis[3],
1164  const float y_axis[3],
1165  float size_x,
1166  float size_y,
1167  float rsample[3]);
1168 void EEVEE_random_rotation_m4(int sample_ofs, float scale, float r_mat[4][4]);
1169 
1170 /* eevee_shaders.c */
1173 struct GPUShader *EEVEE_shaders_bloom_blit_get(bool high_quality);
1174 struct GPUShader *EEVEE_shaders_bloom_downsample_get(bool high_quality);
1175 struct GPUShader *EEVEE_shaders_bloom_upsample_get(bool high_quality);
1176 struct GPUShader *EEVEE_shaders_bloom_resolve_get(bool high_quality);
1182 struct GPUShader *EEVEE_shaders_depth_of_field_reduce_get(bool is_copy_pass);
1185 struct GPUShader *EEVEE_shaders_depth_of_field_scatter_get(bool is_foreground, bool bokeh_tx);
1186 struct GPUShader *EEVEE_shaders_depth_of_field_resolve_get(bool use_bokeh_tx, bool use_hq_gather);
1210 struct GPUShader *EEVEE_shaders_cryptomatte_sh_get(bool is_hair);
1245  EEVEE_Data *vedata, struct Scene *scene, Material *ma, World *wo, int options);
1246 void EEVEE_shaders_free(void);
1247 
1248 /* eevee_lightprobes.c */
1249 bool EEVEE_lightprobes_obj_visibility_cb(bool vis_in, void *user_data);
1256 void EEVEE_lightprobes_free(void);
1257 
1259  EEVEE_Data *vedata,
1260  GPUTexture *rt_color,
1261  GPUTexture *rt_depth);
1263  EEVEE_Data *vedata,
1264  struct GPUFrameBuffer *face_fb[6]);
1266  EEVEE_Data *vedata,
1267  struct GPUFrameBuffer *face_fb[6],
1268  const float pos[3],
1269  float near_clip,
1270  float far_clip);
1272  EEVEE_Data *vedata,
1273  struct GPUTexture *rt_color,
1274  struct GPUFrameBuffer *fb,
1275  int probe_idx,
1276  float intensity,
1277  int maxlevel,
1278  float filter_quality,
1279  float firefly_fac);
1281  EEVEE_Data *vedata,
1282  struct GPUTexture *rt_color,
1283  struct GPUFrameBuffer *fb,
1284  int grid_offset,
1285  float intensity);
1287  EEVEE_Data *vedata,
1288  struct GPUTexture *rt_depth,
1289  struct GPUFrameBuffer *fb,
1290  int grid_offset,
1291  float clipsta,
1292  float clipend,
1293  float vis_range,
1294  float vis_blur,
1295  int vis_size);
1296 
1297 void EEVEE_lightprobes_grid_data_from_object(Object *ob, EEVEE_LightGrid *egrid, int *offset);
1300  EEVEE_PlanarReflection *eplanar,
1301  EEVEE_LightProbeVisTest *vis_test);
1302 
1303 /* eevee_depth_of_field.c */
1308  float r_jitter[2],
1309  float *r_focus_distance);
1311  int sample_count,
1312  int *r_ring_count);
1313 
1314 /* eevee_bloom.c */
1317 void EEVEE_bloom_draw(EEVEE_Data *vedata);
1318 void EEVEE_bloom_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, uint tot_samples);
1320 
1321 /* eevee_cryptomatte.c */
1324  EEVEE_Data *vedata,
1325  int tot_samples);
1329  EEVEE_ViewLayerData *sldata,
1330  Object *ob);
1332  EEVEE_ViewLayerData *sldata,
1333  Object *ob);
1335 void EEVEE_cryptomatte_update_passes(struct RenderEngine *engine,
1336  struct Scene *scene,
1337  struct ViewLayer *view_layer);
1339  const char *viewname,
1340  const rcti *rect,
1341  EEVEE_Data *vedata,
1342  EEVEE_ViewLayerData *sldata);
1343 void EEVEE_cryptomatte_store_metadata(EEVEE_Data *vedata, struct RenderResult *render_result);
1344 void EEVEE_cryptomatte_free(EEVEE_Data *vedata);
1345 
1346 /* eevee_occlusion.c */
1349  EEVEE_Data *vedata,
1350  uint tot_samples);
1355 void EEVEE_occlusion_free(void);
1356 
1357 /* eevee_screen_raytrace.c */
1363  EEVEE_Data *vedata,
1364  uint tot_samples);
1366 
1367 /* eevee_subsurface.c */
1372  EEVEE_Data *vedata,
1373  uint tot_samples);
1375  EEVEE_Data *vedata,
1376  Material *ma,
1377  DRWShadingGroup *shgrp,
1378  struct GPUMaterial *gpumat);
1382 
1383 /* eevee_motion_blur.c */
1385 void EEVEE_motion_blur_step_set(EEVEE_Data *vedata, int step);
1389  EEVEE_Data *vedata,
1390  Object *ob,
1391  struct ParticleSystem *psys,
1392  struct ModifierData *md);
1395 void EEVEE_motion_blur_draw(EEVEE_Data *vedata);
1396 
1397 /* eevee_mist.c */
1400 
1401 /* eevee_renderpasses.c */
1402 void EEVEE_renderpasses_init(EEVEE_Data *vedata);
1404  EEVEE_Data *vedata,
1405  uint tot_samples);
1408  EEVEE_Data *vedata,
1409  bool post_effect);
1411  EEVEE_Data *vedata,
1412  eViewLayerEEVEEPassType renderpass_type,
1413  int aov_index);
1418 
1419 /* eevee_temporal_sampling.c */
1424 void EEVEE_temporal_sampling_offset_calc(const double ht_point[2],
1425  const float filter_size,
1426  float r_offset[2]);
1427 void EEVEE_temporal_sampling_matrices_calc(EEVEE_EffectsInfo *effects, const double ht_point[2]);
1431 
1432 /* eevee_volumes.c */
1433 void EEVEE_volumes_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata);
1434 void EEVEE_volumes_set_jitter(EEVEE_ViewLayerData *sldata, uint current_sample);
1437  EEVEE_Data *vedata,
1438  struct Scene *scene,
1439  Object *ob);
1444 void EEVEE_volumes_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, uint tot_samples);
1447 void EEVEE_volumes_free(void);
1448 
1449 /* eevee_effects.c */
1451  EEVEE_Data *vedata,
1452  Object *camera,
1453  const bool minimal);
1456 void EEVEE_effects_downsample_radiance_buffer(EEVEE_Data *vedata, struct GPUTexture *texture_src);
1457 void EEVEE_create_minmax_buffer(EEVEE_Data *vedata, struct GPUTexture *depth_src, int layer);
1458 void EEVEE_downsample_cube_buffer(EEVEE_Data *vedata, struct GPUTexture *texture_src, int level);
1459 void EEVEE_draw_effects(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata);
1460 
1461 /* eevee_render.c */
1462 bool EEVEE_render_init(EEVEE_Data *vedata,
1463  struct RenderEngine *engine,
1464  struct Depsgraph *depsgraph);
1465 void EEVEE_render_view_sync(EEVEE_Data *vedata,
1466  struct RenderEngine *engine,
1467  struct Depsgraph *depsgraph);
1469  struct RenderEngine *engine,
1470  struct Depsgraph *depsgraph);
1472 void EEVEE_render_cache(void *vedata,
1473  struct Object *ob,
1474  struct RenderEngine *engine,
1475  struct Depsgraph *depsgraph);
1477  struct RenderEngine *engine,
1478  struct RenderLayer *rl,
1479  const struct rcti *rect);
1481  struct RenderEngine *engine,
1482  struct RenderLayer *rl,
1483  const rcti *rect);
1484 void EEVEE_render_update_passes(struct RenderEngine *engine,
1485  struct Scene *scene,
1486  struct ViewLayer *view_layer);
1487 
1489 void EEVEE_lookdev_init(EEVEE_Data *vedata);
1491  EEVEE_ViewLayerData *sldata,
1492  DRWPass *pass,
1493  EEVEE_LightProbesInfo *pinfo,
1494  DRWShadingGroup **r_shgrp);
1495 void EEVEE_lookdev_draw(EEVEE_Data *vedata);
1496 
1498 void EEVEE_cache_populate(void *vedata, Object *ob);
1499 
1501 float *EEVEE_lut_update_ggx_brdf(int lut_size);
1502 float *EEVEE_lut_update_ggx_btdf(int lut_size, int lut_depth);
1503 
1504 /* Shadow Matrix */
1505 static const float texcomat[4][4] = {
1506  /* From NDC to TexCo */
1507  {0.5f, 0.0f, 0.0f, 0.0f},
1508  {0.0f, 0.5f, 0.0f, 0.0f},
1509  {0.0f, 0.0f, 0.5f, 0.0f},
1510  {0.5f, 0.5f, 0.5f, 1.0f},
1511 };
1512 
1513 /* Cube-map Matrices */
1514 static const float cubefacemat[6][4][4] = {
1515  /* Pos X */
1516  {{0.0f, 0.0f, -1.0f, 0.0f},
1517  {0.0f, -1.0f, 0.0f, 0.0f},
1518  {-1.0f, 0.0f, 0.0f, 0.0f},
1519  {0.0f, 0.0f, 0.0f, 1.0f}},
1520  /* Neg X */
1521  {{0.0f, 0.0f, 1.0f, 0.0f},
1522  {0.0f, -1.0f, 0.0f, 0.0f},
1523  {1.0f, 0.0f, 0.0f, 0.0f},
1524  {0.0f, 0.0f, 0.0f, 1.0f}},
1525  /* Pos Y */
1526  {{1.0f, 0.0f, 0.0f, 0.0f},
1527  {0.0f, 0.0f, -1.0f, 0.0f},
1528  {0.0f, 1.0f, 0.0f, 0.0f},
1529  {0.0f, 0.0f, 0.0f, 1.0f}},
1530  /* Neg Y */
1531  {{1.0f, 0.0f, 0.0f, 0.0f},
1532  {0.0f, 0.0f, 1.0f, 0.0f},
1533  {0.0f, -1.0f, 0.0f, 0.0f},
1534  {0.0f, 0.0f, 0.0f, 1.0f}},
1535  /* Pos Z */
1536  {{1.0f, 0.0f, 0.0f, 0.0f},
1537  {0.0f, -1.0f, 0.0f, 0.0f},
1538  {0.0f, 0.0f, -1.0f, 0.0f},
1539  {0.0f, 0.0f, 0.0f, 1.0f}},
1540  /* Neg Z */
1541  {{-1.0f, 0.0f, 0.0f, 0.0f},
1542  {0.0f, -1.0f, 0.0f, 0.0f},
1543  {0.0f, 0.0f, 1.0f, 0.0f},
1544  {0.0f, 0.0f, 0.0f, 1.0f}},
1545 };
1546 
1547 #ifdef __cplusplus
1548 }
1549 #endif
Camera data-block and utility functions.
#define BLI_STATIC_ASSERT_ALIGN(st, align)
Definition: BLI_assert.h:89
#define BLI_BITMAP_SIZE(_tot)
Definition: BLI_bitmap.h:47
unsigned int BLI_bitmap
Definition: BLI_bitmap.h:32
#define BLI_INLINE
unsigned char uchar
Definition: BLI_sys_types.h:86
unsigned int uint
Definition: BLI_sys_types.h:83
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:51
eViewLayerEEVEEPassType
@ OB_MATERIAL
@ SCE_PASS_COMBINED
#define V3D_HIDE_OVERLAYS
@ V3D_OVERLAY_LOOK_DEV
static AppView * view
GPUBatch
Definition: GPU_batch.h:93
struct GPUFrameBuffer GPUFrameBuffer
struct GPUShader GPUShader
Definition: GPU_shader.h:33
struct GPUTexture GPUTexture
Definition: GPU_texture.h:33
eGPUTextureFormat
Definition: GPU_texture.h:84
struct GPUUniformBuf GPUUniformBuf
struct GPUVertBuf GPUVertBuf
CCL_NAMESPACE_BEGIN struct Options options
Scene scene
const Depsgraph * depsgraph
void * user_data
eDRWLevelOfDetail
Definition: draw_cache.h:36
struct GPUTexture * depth_src
Definition: eevee_effects.c:37
EEVEE_DofGatherPass
@ DOF_GATHER_HOLEFILL
@ DOF_GATHER_FOREGROUND
@ DOF_GATHER_BACKGROUND
@ DOF_GATHER_MAX_PASS
void EEVEE_occlusion_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
struct GPUShader * EEVEE_shaders_depth_of_field_setup_get(void)
#define MAX_AOVS
Definition: eevee_private.h:56
struct EEVEE_CommonUniformBuffer EEVEE_CommonUniformBuffer
void EEVEE_cryptomatte_output_accumulate(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
struct GPUShader * EEVEE_shaders_subsurface_translucency_sh_get(void)
struct EEVEE_GeometryMotionData EEVEE_GeometryMotionData
void EEVEE_volumes_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_refraction_compute(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
struct EEVEE_Shadow EEVEE_Shadow
struct GPUShader * EEVEE_shaders_effect_motion_blur_sh_get(void)
struct DrawEngineType draw_engine_eevee_type
Definition: eevee_engine.c:622
struct GPUShader * EEVEE_shaders_effect_color_copy_sh_get(void)
void EEVEE_shadows_update(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
#define MAX_SHADOW_CASCADE
Definition: eevee_private.h:53
float * EEVEE_lut_update_ggx_brdf(int lut_size)
Definition: eevee_lut_gen.c:38
EEVEE_LightProbeEngineData * EEVEE_lightprobe_data_get(Object *ob)
Definition: eevee_data.c:325
void EEVEE_occlusion_free(void)
struct EEVEE_WorldEngineData EEVEE_WorldEngineData
EEVEE_GeometryMotionData * EEVEE_motion_blur_geometry_data_get(EEVEE_MotionBlurData *mb, Object *ob)
Definition: eevee_data.c:196
void EEVEE_shadows_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
Definition: eevee_shadows.c:96
void EEVEE_motion_blur_cache_finish(EEVEE_Data *vedata)
void EEVEE_renderpasses_output_accumulate(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, bool post_effect)
void EEVEE_downsample_cube_buffer(EEVEE_Data *vedata, struct GPUTexture *texture_src, int level)
void EEVEE_volumes_set_jitter(EEVEE_ViewLayerData *sldata, uint current_sample)
Definition: eevee_volumes.c:90
void EEVEE_lightprobes_free(void)
void EEVEE_shaders_free(void)
int EEVEE_depth_of_field_sample_count_get(EEVEE_EffectsInfo *effects, int sample_count, int *r_ring_count)
LightGridCache EEVEE_LightGrid
void EEVEE_cryptomatte_particle_hair_cache_populate(EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata, Object *ob)
struct GPUShader * EEVEE_shaders_cryptomatte_sh_get(bool is_hair)
void EEVEE_cryptomatte_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, int tot_samples)
void EEVEE_sample_ellipse(int sample_ofs, const float x_axis[3], const float y_axis[3], float size_x, float size_y, float rsample[3])
EEVEE_LightEngineData * EEVEE_light_data_get(Object *ob)
Definition: eevee_data.c:351
struct GPUShader * EEVEE_shaders_probe_planar_display_sh_get(void)
struct EEVEE_PassList EEVEE_PassList
void EEVEE_lights_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
Definition: eevee_lights.c:246
@ VAR_WORLD_BACKGROUND
@ VAR_MAT_HOLDOUT
@ VAR_WORLD_VOLUME
@ VAR_MAT_BLEND
@ VAR_MAT_HASH
@ VAR_MAT_DEPTH
@ VAR_DEFAULT
@ VAR_WORLD_PROBE
@ VAR_MAT_LOOKDEV
@ VAR_MAT_VOLUME
@ VAR_MAT_REFRACT
@ VAR_MAT_MESH
@ VAR_MAT_HAIR
void EEVEE_lightprobes_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
struct GPUShader * EEVEE_shaders_effect_maxz_downlevel_sh_get(void)
struct GPUShader * EEVEE_shaders_shadow_accum_sh_get(void)
struct GPUShader * EEVEE_shaders_velocity_resolve_sh_get(void)
struct GPUShader * EEVEE_shaders_effect_maxz_downdepth_sh_get(void)
void EEVEE_lightbake_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, GPUTexture *rt_color, GPUTexture *rt_depth)
void EEVEE_temporal_sampling_offset_calc(const double ht_point[2], const float filter_size, float r_offset[2])
void EEVEE_bloom_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
struct GPUShader * EEVEE_shaders_effect_maxz_copydepth_sh_get(void)
void EEVEE_update_noise(EEVEE_PassList *psl, EEVEE_FramebufferList *fbl, const double offsets[3])
void EEVEE_lightbake_filter_visibility(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, struct GPUTexture *rt_depth, struct GPUFrameBuffer *fb, int grid_offset, float clipsta, float clipend, float vis_range, float vis_blur, int vis_size)
struct GPUShader * EEVEE_shaders_probe_grid_fill_sh_get(void)
EEVEE_ViewLayerData * EEVEE_view_layer_data_get(void)
Definition: eevee_data.c:253
void EEVEE_subsurface_compute(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_screen_raytrace_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_lookdev_init(EEVEE_Data *vedata)
Definition: eevee_lookdev.c:99
void EEVEE_motion_blur_cache_populate(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, Object *ob)
struct EEVEE_LightsInfo EEVEE_LightsInfo
struct GPUShader * EEVEE_shaders_subsurface_first_pass_sh_get(void)
struct EEVEE_ShadowCascade EEVEE_ShadowCascade
bool EEVEE_shadows_cube_setup(EEVEE_LightsInfo *linfo, const EEVEE_Light *evli, int sample_ofs)
void EEVEE_shadows_draw_cascades(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, DRWView *view, int cascade_index)
int EEVEE_temporal_sampling_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_lightprobes_cube_data_from_object(Object *ob, EEVEE_LightProbe *eprobe)
@ KEY_HAIR
@ KEY_CULL
@ KEY_SHADOW
@ KEY_REFRACT
EEVEE_ViewLayerData * EEVEE_view_layer_data_ensure(void)
Definition: eevee_data.c:276
void EEVEE_lights_cache_add(EEVEE_ViewLayerData *sldata, struct Object *ob)
Definition: eevee_lights.c:216
void EEVEE_materials_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_volumes_resolve(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_cache_populate(void *vedata, Object *ob)
Definition: eevee_engine.c:112
EEVEE_ShadowCasterBuffer
void EEVEE_volumes_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
struct GPUShader * EEVEE_shaders_effect_minz_copydepth_sh_get(void)
bool EEVEE_lightprobes_obj_visibility_cb(bool vis_in, void *user_data)
void EEVEE_temporal_sampling_matrices_calc(EEVEE_EffectsInfo *effects, const double ht_point[2])
struct GPUShader * EEVEE_shaders_depth_of_field_bokeh_get(void)
void EEVEE_render_modules_init(EEVEE_Data *vedata, struct RenderEngine *engine, struct Depsgraph *depsgraph)
Definition: eevee_render.c:135
EEVEE_ObjectEngineData * EEVEE_object_data_ensure(Object *ob)
Definition: eevee_data.c:307
struct EEVEE_PlanarReflection EEVEE_PlanarReflection
World * EEVEE_world_default_get(void)
void EEVEE_render_view_sync(EEVEE_Data *vedata, struct RenderEngine *engine, struct Depsgraph *depsgraph)
Definition: eevee_render.c:156
@ PROBE_UPDATE_CUBE
@ PROBE_UPDATE_ALL
@ PROBE_UPDATE_GRID
void EEVEE_render_read_result(EEVEE_Data *vedata, struct RenderEngine *engine, struct RenderLayer *rl, const rcti *rect)
Definition: eevee_render.c:671
void EEVEE_lightprobes_refresh(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_lightprobes_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_reflection_compute(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_lightprobes_planar_data_from_object(Object *ob, EEVEE_PlanarReflection *eplanar, EEVEE_LightProbeVisTest *vis_test)
void EEVEE_volumes_cache_object_add(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, struct Scene *scene, Object *ob)
void EEVEE_volumes_free(void)
struct EEVEE_CryptomatteSample EEVEE_CryptomatteSample
void EEVEE_shadow_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, uint tot_samples)
void EEVEE_temporal_sampling_reset(EEVEE_Data *vedata)
void EEVEE_motion_blur_swap_data(EEVEE_Data *vedata)
void EEVEE_volumes_compute(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
static const float texcomat[4][4]
EEVEE_WorldEngineData * EEVEE_world_data_ensure(World *wo)
Definition: eevee_data.c:382
struct GPUShader * EEVEE_shaders_studiolight_background_sh_get(void)
void EEVEE_shadows_cube_add(EEVEE_LightsInfo *linfo, EEVEE_Light *evli, struct Object *ob)
void EEVEE_occlusion_draw_debug(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_lightprobes_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void eevee_id_update(void *vedata, ID *id)
Definition: eevee_engine.c:420
void EEVEE_object_hair_cache_populate(EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata, Object *ob, bool *cast_shadow)
void EEVEE_bloom_output_accumulate(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
struct EEVEE_HairMotionData EEVEE_HairMotionData
struct GPUShader * EEVEE_shaders_effect_motion_blur_velocity_tiles_sh_get(void)
void EEVEE_reflection_output_accumulate(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_occlusion_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, uint tot_samples)
int EEVEE_bloom_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_render_cache(void *vedata, struct Object *ob, struct RenderEngine *engine, struct Depsgraph *depsgraph)
Definition: eevee_render.c:198
void EEVEE_renderpasses_init(EEVEE_Data *vedata)
struct EEVEE_LightProbeVisTest EEVEE_LightProbeVisTest
void EEVEE_effects_downsample_radiance_buffer(EEVEE_Data *vedata, struct GPUTexture *texture_src)
struct GPUShader * EEVEE_shaders_volumes_scatter_sh_get(void)
struct GPUShader * EEVEE_shaders_depth_of_field_dilate_tiles_get(bool pass)
void EEVEE_motion_blur_data_init(EEVEE_MotionBlurData *mb)
Definition: eevee_data.c:102
struct EEVEE_MotionBlurData EEVEE_MotionBlurData
void EEVEE_render_update_passes(struct RenderEngine *engine, struct Scene *scene, struct ViewLayer *view_layer)
Definition: eevee_render.c:695
void EEVEE_depth_of_field_draw(EEVEE_Data *vedata)
Material * EEVEE_material_default_diffuse_get(void)
void EEVEE_effects_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
struct GPUShader * EEVEE_shaders_effect_downsample_cube_sh_get(void)
void EEVEE_lookdev_draw(EEVEE_Data *vedata)
void EEVEE_materials_cache_populate(EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata, Object *ob, bool *cast_shadow)
struct GPUShader * EEVEE_shaders_effect_minz_downdepth_sh_get(void)
struct GPUShader * EEVEE_shaders_effect_reflection_trace_sh_get(void)
void EEVEE_random_rotation_m4(int sample_ofs, float scale, float r_mat[4][4])
void EEVEE_effects_draw_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
#define MAX_BLOOM_STEP
Definition: eevee_private.h:55
void EEVEE_lights_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
Definition: eevee_lights.c:208
void EEVEE_volumes_free_smoke_textures(void)
void EEVEE_cryptomatte_cache_populate(EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata, Object *ob)
void EEVEE_subsurface_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
struct GPUShader * EEVEE_shaders_ggx_lut_sh_get(void)
struct GPUShader * EEVEE_shaders_probe_filter_visibility_sh_get(void)
EEVEE_ObjectEngineData * EEVEE_object_data_get(Object *ob)
Definition: eevee_data.c:299
void EEVEE_cryptomatte_update_passes(struct RenderEngine *engine, struct Scene *scene, struct ViewLayer *view_layer)
struct EEVEE_LightEngineData EEVEE_LightEngineData
Material * EEVEE_material_default_glossy_get(void)
void EEVEE_depth_of_field_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_lightbake_render_world(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, struct GPUFrameBuffer *face_fb[6])
void EEVEE_renderpasses_draw(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
struct GPUShader * EEVEE_shaders_effect_reflection_resolve_sh_get(void)
void EEVEE_renderpasses_draw_debug(EEVEE_Data *vedata)
void EEVEE_render_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
Definition: eevee_render.c:179
struct bNodeTree * EEVEE_shader_default_surface_nodetree(Material *ma)
int EEVEE_motion_blur_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
struct EEVEE_ObjectEngineData EEVEE_ObjectEngineData
#define MAX_SHADOW_CUBE
Definition: eevee_private.h:54
void EEVEE_draw_effects(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
struct GPUShader * EEVEE_shaders_effect_minz_downlevel_sh_get(void)
struct GPUShader * EEVEE_shaders_effect_downsample_sh_get(void)
void EEVEE_reflection_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, uint tot_samples)
void EEVEE_bloom_draw(EEVEE_Data *vedata)
Definition: eevee_bloom.c:243
void eevee_light_matrix_get(const EEVEE_Light *evli, float r_mat[4][4])
Definition: eevee_lights.c:32
struct GPUShader * EEVEE_shaders_probe_filter_diffuse_sh_get(void)
struct GPUShader * EEVEE_shaders_bloom_blit_get(bool high_quality)
void EEVEE_effects_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, Object *camera, const bool minimal)
Definition: eevee_effects.c:71
void EEVEE_subsurface_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
struct EEVEE_TextureList EEVEE_TextureList
BLI_STATIC_ASSERT(sizeof(EEVEE_Shadow) *MAX_SHADOW+sizeof(EEVEE_ShadowCascade) *MAX_SHADOW_CASCADE+sizeof(EEVEE_ShadowCube) *MAX_SHADOW_CUBE< 16384, "Shadow UBO is too big!!!") typedef struct EEVEE_ShadowCasterBuffer
int EEVEE_temporal_sampling_sample_count_get(const Scene *scene, const EEVEE_StorageList *stl)
struct GPUShader * EEVEE_shaders_effect_motion_blur_hair_sh_get(void)
void EEVEE_subsurface_add_pass(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, Material *ma, DRWShadingGroup *shgrp, struct GPUMaterial *gpumat)
void EEVEE_subsurface_output_accumulate(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_lightprobes_grid_data_from_object(Object *ob, EEVEE_LightGrid *egrid, int *offset)
struct EEVEE_ShadowCascadeRender EEVEE_ShadowCascadeRender
struct EEVEE_ObjectKey EEVEE_ObjectKey
void EEVEE_renderpasses_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, uint tot_samples)
void EEVEE_temporal_sampling_draw(EEVEE_Data *vedata)
void EEVEE_cryptomatte_render_result(struct RenderLayer *rl, const char *viewname, const rcti *rect, EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata)
EEVEE_HairMotionData * EEVEE_motion_blur_hair_data_get(EEVEE_MotionBlurData *mb, Object *ob)
Definition: eevee_data.c:201
void EEVEE_motion_blur_step_set(EEVEE_Data *vedata, int step)
struct GPUMaterial * EEVEE_material_default_get(struct Scene *scene, Material *ma, int options)
struct GPUShader * EEVEE_shaders_probe_cube_display_sh_get(void)
struct GPUShader * EEVEE_shaders_volumes_integration_sh_get(void)
void EEVEE_create_minmax_buffer(EEVEE_Data *vedata, struct GPUTexture *depth_src, int layer)
void EEVEE_lightbake_render_scene(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, struct GPUFrameBuffer *face_fb[6], const float pos[3], float near_clip, float far_clip)
void EEVEE_sample_ball(int sample_ofs, float radius, float rsample[3])
struct bNodeTree * EEVEE_shader_default_world_nodetree(World *wo)
void EEVEE_shadows_cascade_add(EEVEE_LightsInfo *linfo, EEVEE_Light *evli, struct Object *ob)
struct GPUShader * EEVEE_shaders_effect_maxz_copydepth_layer_sh_get(void)
struct GPUShader * EEVEE_shaders_taa_resolve_sh_get(EEVEE_EffectsFlag enabled_effects)
void EEVEE_cryptomatte_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
eEEVEEMotionData
@ EEVEE_MOTION_DATA_HAIR
@ EEVEE_MOTION_DATA_MESH
void EEVEE_render_draw(EEVEE_Data *vedata, struct RenderEngine *engine, struct RenderLayer *rl, const struct rcti *rect)
#define MAX_PLANAR
Definition: eevee_private.h:49
void EEVEE_shadows_caster_register(EEVEE_ViewLayerData *sldata, struct Object *ob)
void EEVEE_renderpasses_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
#define MAX_PROBE
Definition: eevee_private.h:47
void EEVEE_motion_blur_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
struct EEVEE_ViewLayerData EEVEE_ViewLayerData
void EEVEE_lightbake_filter_diffuse(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, struct GPUTexture *rt_color, struct GPUFrameBuffer *fb, int grid_offset, float intensity)
struct GPUShader * EEVEE_shaders_volumes_accum_sh_get(void)
struct GPUShader * EEVEE_shaders_subsurface_second_pass_sh_get(void)
void EEVEE_cryptomatte_free(EEVEE_Data *vedata)
struct EEVEE_PrivateData EEVEE_PrivateData
void EEVEE_motion_blur_draw(EEVEE_Data *vedata)
struct GPUShader * EEVEE_shaders_effect_minz_downdepth_layer_sh_get(void)
struct GPUShader * EEVEE_shaders_probe_planar_downsample_sh_get(void)
void EEVEE_lightprobes_cache_add(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, Object *ob)
void EEVEE_shadows_init(EEVEE_ViewLayerData *sldata)
Definition: eevee_shadows.c:41
void EEVEE_mist_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
Definition: eevee_mist.c:35
int EEVEE_depth_of_field_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, Object *camera)
EEVEE_EffectsFlag
@ EFFECT_TAA_REPROJECT
@ EFFECT_RADIANCE_BUFFER
@ EFFECT_DOUBLE_BUFFER
@ EFFECT_MOTION_BLUR
@ EFFECT_SSS
@ EFFECT_GTAO
@ EFFECT_DOF
@ EFFECT_BLOOM
@ EFFECT_VELOCITY_BUFFER
@ EFFECT_DEPTH_DOUBLE_BUFFER
@ EFFECT_REFRACT
@ EFFECT_POST_BUFFER
@ EFFECT_NORMAL_BUFFER
@ EFFECT_SSR
@ EFFECT_TAA
@ EFFECT_VOLUMETRIC
static const float cubefacemat[6][4][4]
float * EEVEE_lut_update_ggx_btdf(int lut_size, int lut_depth)
Definition: eevee_lut_gen.c:75
void EEVEE_materials_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_temporal_sampling_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
int EEVEE_occlusion_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
struct EEVEE_EffectsInfo EEVEE_EffectsInfo
void EEVEE_lightprobes_refresh_planar(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
struct EEVEE_ShadowCube EEVEE_ShadowCube
void EEVEE_cryptomatte_object_hair_cache_populate(EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata, Object *ob)
void EEVEE_materials_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, EEVEE_StorageList *stl, EEVEE_FramebufferList *fbl)
struct GPUShader * EEVEE_shaders_effect_ambient_occlusion_debug_sh_get(void)
struct GPUShader * EEVEE_shaders_depth_of_field_scatter_get(bool is_foreground, bool bokeh_tx)
#define MAX_GRID
Definition: eevee_private.h:48
struct EEVEE_LightProbesInfo EEVEE_LightProbesInfo
struct GPUShader * EEVEE_shaders_effect_motion_blur_velocity_tiles_expand_sh_get(void)
struct GPUShader * EEVEE_shaders_depth_of_field_gather_get(EEVEE_DofGatherPass pass, bool bokeh_tx)
EEVEE_LightEngineData * EEVEE_light_data_ensure(Object *ob)
Definition: eevee_data.c:359
int EEVEE_screen_raytrace_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_volumes_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
struct GPUShader * EEVEE_shaders_studiolight_probe_sh_get(void)
void EEVEE_volumes_output_accumulate(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_shadows_draw(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, struct DRWView *view)
struct GPUMaterial * EEVEE_material_get(EEVEE_Data *vedata, struct Scene *scene, Material *ma, World *wo, int options)
#define MAX_LIGHT
Definition: eevee_private.h:50
struct GPUShader * EEVEE_shaders_bloom_upsample_get(bool high_quality)
void EEVEE_material_bind_resources(DRWShadingGroup *shgrp, struct GPUMaterial *gpumat, EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, const int *ssr_id, const float *refract_depth, bool use_ssrefraction, bool use_alpha_blend)
struct GPUShader * EEVEE_shaders_effect_mist_sh_get(void)
Material * EEVEE_material_default_error_get(void)
struct GPUShader * EEVEE_shaders_update_noise_sh_get(void)
struct GPUShader * EEVEE_shaders_bloom_resolve_get(bool high_quality)
struct EEVEE_Data EEVEE_Data
void EEVEE_bloom_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, uint tot_samples)
struct GPUShader * EEVEE_shaders_ggx_refraction_lut_sh_get(void)
struct GPUShader * EEVEE_shaders_depth_of_field_flatten_tiles_get(void)
void EEVEE_sample_rectangle(int sample_ofs, const float x_axis[3], const float y_axis[3], float size_x, float size_y, float rsample[3])
void EEVEE_motion_blur_hair_cache_populate(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, Object *ob, struct ParticleSystem *psys, struct ModifierData *md)
void EEVEE_material_renderpasses_init(EEVEE_Data *vedata)
void EEVEE_temporal_sampling_create_view(EEVEE_Data *vedata)
int EEVEE_renderpasses_aov_hash(const ViewLayerAOV *aov)
void EEVEE_volumes_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, uint tot_samples)
BLI_INLINE bool eevee_hdri_preview_overlay_enabled(const View3D *v3d)
void EEVEE_temporal_sampling_update_matrices(EEVEE_Data *vedata)
void EEVEE_shadow_output_accumulate(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
struct GPUShader * EEVEE_shaders_volumes_scatter_with_lights_sh_get(void)
struct GPUShader * EEVEE_shaders_effect_ambient_occlusion_sh_get(void)
void EEVEE_material_output_accumulate(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
struct GPUShader * EEVEE_shaders_volumes_clear_sh_get(void)
struct EEVEE_FramebufferList EEVEE_FramebufferList
struct GPUShader * EEVEE_shaders_depth_of_field_resolve_get(bool use_bokeh_tx, bool use_hq_gather)
#define MAX_CASCADE_NUM
Definition: eevee_private.h:51
bool EEVEE_depth_of_field_jitter_get(EEVEE_EffectsInfo *effects, float r_jitter[2], float *r_focus_distance)
struct EEVEE_RenderPassData EEVEE_RenderPassData
struct GPUShader * EEVEE_shaders_depth_of_field_reduce_get(bool is_copy_pass)
EEVEE_ViewLayerData * EEVEE_view_layer_data_ensure_ex(struct ViewLayer *view_layer)
Definition: eevee_data.c:263
void EEVEE_materials_free(void)
struct EEVEE_Light EEVEE_Light
void EEVEE_view_layer_data_free(void *storage)
Definition: eevee_data.c:208
struct GPUShader * EEVEE_shaders_volumes_resolve_sh_get(bool accum)
void EEVEE_motion_blur_data_free(EEVEE_MotionBlurData *mb)
Definition: eevee_data.c:112
struct GPUShader * EEVEE_shaders_shadow_sh_get(void)
EEVEE_ObjectMotionData * EEVEE_motion_blur_object_data_get(EEVEE_MotionBlurData *mb, Object *ob, bool hair)
Definition: eevee_data.c:124
void EEVEE_cryptomatte_store_metadata(EEVEE_Data *vedata, struct RenderResult *render_result)
struct EEVEE_BoundBox EEVEE_BoundBox
struct GPUShader * EEVEE_shaders_effect_maxz_downdepth_layer_sh_get(void)
struct GPUShader * EEVEE_shaders_effect_motion_blur_object_sh_get(void)
void EEVEE_shadows_draw_cubemap(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, int cube_index)
void EEVEE_particle_hair_cache_populate(EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata, Object *ob, bool *cast_shadow)
#define MAX_SHADOW
Definition: eevee_private.h:52
struct EEVEE_StorageList EEVEE_StorageList
void EEVEE_subsurface_draw_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_material_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, uint tot_samples)
struct DRWShaderLibrary * EEVEE_shader_lib_get(void)
struct EEVEE_ObjectMotionData EEVEE_ObjectMotionData
struct GPUShader * EEVEE_shaders_probe_filter_glossy_sh_get(void)
struct GPUShader * EEVEE_shaders_probe_grid_display_sh_get(void)
void EEVEE_lightbake_filter_glossy(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, struct GPUTexture *rt_color, struct GPUFrameBuffer *fb, int probe_idx, float intensity, int maxlevel, float filter_quality, float firefly_fac)
void EEVEE_subsurface_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, uint tot_samples)
void EEVEE_renderpasses_postprocess(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, eViewLayerEEVEEPassType renderpass_type, int aov_index)
void EEVEE_lookdev_cache_init(EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata, DRWPass *pass, EEVEE_LightProbesInfo *pinfo, DRWShadingGroup **r_shgrp)
void EEVEE_cryptomatte_renderpasses_init(EEVEE_Data *vedata)
bool EEVEE_renderpasses_only_first_sample_pass_active(EEVEE_Data *vedata)
struct GPUShader * EEVEE_shaders_renderpasses_post_process_sh_get(void)
void EEVEE_shaders_material_shaders_init(void)
EEVEE_LightProbeEngineData * EEVEE_lightprobe_data_ensure(Object *ob)
Definition: eevee_data.c:333
LightProbeCache EEVEE_LightProbe
bool EEVEE_render_init(EEVEE_Data *vedata, struct RenderEngine *engine, struct Depsgraph *depsgraph)
Definition: eevee_render.c:50
struct EEVEE_LightProbeEngineData EEVEE_LightProbeEngineData
struct GPUShader * EEVEE_shaders_bloom_downsample_get(bool high_quality)
void EEVEE_occlusion_output_accumulate(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
struct GPUShader * EEVEE_shaders_depth_of_field_downsample_get(void)
void EEVEE_subsurface_data_render(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_mist_output_accumulate(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
struct GPUTexture * EEVEE_materials_get_util_tex(void)
void EEVEE_occlusion_compute(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
void EEVEE_volumes_draw_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
EEVEE_WorldEngineData * EEVEE_world_data_get(World *wo)
Definition: eevee_data.c:377
struct GPUShader * EEVEE_shaders_depth_of_field_filter_get(void)
void eevee_contact_shadow_setup(const Light *la, EEVEE_Shadow *evsh)
Definition: eevee_shadows.c:34
uint pos
BLI_INLINE float fb(float length, float L)
int count
static void update(bNodeTree *ntree)
DRWViewUboStorage storage
Definition: draw_manager.h:407
float halfdim[3]
EEVEE_TextureList * txl
EEVEE_StorageList * stl
char info[GPU_INFO_SIZE]
EEVEE_PassList * psl
EEVEE_FramebufferList * fbl
void * engine_type
float blit_texel_size[2]
struct GPUTexture * dof_scatter_src_tx
struct GPUTexture * gtao_horizons_renderpass
float downsamp_texel_size[MAX_BLOOM_STEP][2]
struct GPUTexture * dof_coc_dilated_tiles_bg_tx
struct GPUTexture * source_buffer
float prev_drw_persmat[4][4]
struct GPUTexture * sss_irradiance
struct GPUTexture * gtao_horizons
struct GPUTexture * dof_bokeh_scatter_lut_tx
struct GPUTexture * dof_reduce_input_color_tx
struct GPUTexture * dof_coc_dilated_tiles_fg_tx
struct GPUTexture * dof_fg_holefill_weight_tx
float motion_blur_near_far[2]
struct GPUTexture * velocity_tiles_x_tx
float bloom_curve_threshold[4]
struct GPUTexture * final_tx
struct GPUTexture * dof_fg_color_tx
float dof_scatter_color_threshold
struct GPUTexture * ssr_hit_output
struct GPUTexture * dof_bg_color_tx
float unf_source_texel_size[2]
struct GPUTexture * bloom_blit
struct GPUFrameBuffer * target_buffer
struct GPUTexture * dof_coc_tiles_bg_tx
bool ssr_was_valid_double_buffer
struct GPUTexture * bloom_upsample[MAX_BLOOM_STEP - 1]
float current_world_to_ndc[4][4]
float dof_bokeh_aniso[2]
struct GPUTexture * ssr_specrough_input
eDRWLevelOfDetail sphere_lod
struct GPUTexture * sss_blur
struct GPUTexture * sss_radius
struct GPUTexture * volume_transmit
struct GPUTexture * velocity_tiles_tx
float dof_bokeh_aniso_inv[2]
struct GPUTexture * volume_scatter
struct GPUTexture * dof_downsample_tx
struct GPUTexture * dof_fg_weight_tx
struct GPUTexture * bloom_downsample[MAX_BLOOM_STEP]
struct GPUTexture * dof_fg_occlusion_tx
float source_texel_size[2]
CameraParams current_cam_params
EEVEE_EffectsFlag enabled_effects
struct GPUTexture * unf_base_buffer
struct GPUTexture * sss_stencil
struct GPUTexture * velocity_tx
struct GPUTexture * gtao_horizons_debug
struct GPUTexture * dof_half_res_color_tx
struct GPUTexture * dof_bokeh_resolve_lut_tx
float prev_persmat[4][4]
float dof_scatter_coc_threshold
struct GPUFrameBuffer * final_fb
struct GPUTexture * ssr_normal_input
struct GPUTexture * dof_reduce_input_coc_tx
struct DRWView * lookdev_view
struct GPUTexture * dof_fg_holefill_color_tx
struct GPUTexture * dof_coc_tiles_fg_tx
float dof_coc_params[2]
struct DRWView * taa_view
eGPUTextureFormat dof_color_format
int dof_dilate_ring_width_multiplier
float current_world_to_view[4][4]
struct GPUTexture * unf_source_buffer
float dof_scatter_neighbor_max_color
struct GPUTexture * dof_bg_occlusion_tx
struct GPUTexture * dof_bokeh_gather_lut_tx
struct GPUTexture * ssr_hit_depth
struct EEVEE_MotionBlurData motion_blur
struct GPUTexture * dof_half_res_coc_tx
float past_world_to_ndc[4][4]
float past_world_to_view[4][4]
struct GPUTexture * sss_albedo
CameraParams past_cam_params
float current_ndc_to_world[4][4]
struct GPUTexture * dof_bg_weight_tx
struct GPUFrameBuffer * volumetric_fb
struct GPUFrameBuffer * main_fb
struct GPUFrameBuffer * volumetric_scat_fb
struct GPUFrameBuffer * sss_resolve_fb
struct GPUFrameBuffer * bloom_blit_fb
struct GPUFrameBuffer * taa_history_color_fb
struct GPUFrameBuffer * radiance_filtered_fb
struct GPUFrameBuffer * screen_tracing_fb
struct GPUFrameBuffer * velocity_tiles_fb[2]
struct GPUFrameBuffer * mist_accum_fb
struct GPUFrameBuffer * planar_downsample_fb
struct GPUFrameBuffer * dof_gather_fg_fb
struct GPUFrameBuffer * dof_reduce_copy_fb
struct GPUFrameBuffer * double_buffer_color_fb
struct GPUFrameBuffer * gtao_fb
struct GPUFrameBuffer * update_noise_fb
struct GPUFrameBuffer * sss_translucency_fb
struct GPUFrameBuffer * velocity_resolve_fb
struct GPUFrameBuffer * cryptomatte_fb
struct GPUFrameBuffer * dof_flatten_tiles_fb
struct GPUFrameBuffer * sss_blit_fb
struct GPUFrameBuffer * material_accum_fb
struct GPUFrameBuffer * ao_accum_fb
struct GPUFrameBuffer * dof_filter_fg_fb
struct GPUFrameBuffer * double_buffer_depth_fb
struct GPUFrameBuffer * dof_bokeh_fb
struct GPUFrameBuffer * sss_accum_fb
struct GPUFrameBuffer * volumetric_integ_fb
struct GPUFrameBuffer * downsample_fb
struct GPUFrameBuffer * sss_clear_fb
struct GPUFrameBuffer * shadow_accum_fb
struct GPUFrameBuffer * dof_setup_fb
struct GPUFrameBuffer * taa_history_fb
struct GPUFrameBuffer * main_color_fb
struct GPUFrameBuffer * bloom_pass_accum_fb
struct GPUFrameBuffer * dof_downsample_fb
struct GPUFrameBuffer * dof_reduce_fb
struct GPUFrameBuffer * double_buffer_fb
struct GPUFrameBuffer * sss_blur_fb
struct GPUFrameBuffer * effect_fb
struct GPUFrameBuffer * dof_gather_bg_fb
struct GPUFrameBuffer * dof_scatter_bg_fb
struct GPUFrameBuffer * planarref_fb
struct GPUFrameBuffer * velocity_fb
struct GPUFrameBuffer * bloom_accum_fb[MAX_BLOOM_STEP - 1]
struct GPUFrameBuffer * renderpass_fb
struct GPUFrameBuffer * volumetric_accum_fb
struct GPUFrameBuffer * gtao_debug_fb
struct GPUFrameBuffer * dof_dilate_tiles_fb
struct GPUFrameBuffer * maxzbuffer_fb
struct GPUFrameBuffer * dof_gather_fg_holefill_fb
struct GPUFrameBuffer * dof_scatter_fg_fb
struct GPUFrameBuffer * ssr_accum_fb
struct GPUFrameBuffer * dof_filter_bg_fb
struct GPUFrameBuffer * bloom_down_fb[MAX_BLOOM_STEP]
struct GPUFrameBuffer * effect_color_fb
struct GPUVertBuf * vbo[2]
eEEVEEMotionData type
struct GPUBatch * batch
eEEVEEMotionData type
struct EEVEE_HairMotionData::@201 psys[0]
struct GPUTexture * hair_pos_tx[2]
struct GPUVertBuf * hair_pos[2]
struct Collection * collection
EEVEE_LightProbeVisTest vis_data
float probemat[6][4][4]
EEVEE_LightProbeVisTest planar_vis_tests[MAX_PLANAR]
EEVEE_LightGrid grid_data[MAX_GRID]
EEVEE_LightProbe probe_data[MAX_PROBE]
EEVEE_PlanarReflection planar_data[MAX_PLANAR]
float rightvec[3]
float color[3]
float forwardvec[3]
float upvec[3]
float light_type
float invsqrdist
float invsqrdist_volume
float volume_radius
float position[3]
struct EEVEE_Light light_data[MAX_LIGHT]
struct EEVEE_ShadowCasterBuffer * shcaster_frontbuffer
uchar shadow_cascade_light_indices[MAX_SHADOW_CASCADE]
struct EEVEE_Shadow shadow_data[MAX_SHADOW]
struct EEVEE_ShadowCube shadow_cube_data[MAX_SHADOW_CUBE]
struct BoundSphere shadow_bounds[MAX_LIGHT]
BLI_bitmap sh_cube_update[BLI_BITMAP_SIZE(MAX_SHADOW_CUBE)]
struct EEVEE_ShadowCascadeRender shadow_cascade_render[MAX_SHADOW_CASCADE]
uchar shadow_cube_light_indices[MAX_SHADOW_CUBE]
struct EEVEE_ShadowCasterBuffer * shcaster_backbuffer
struct EEVEE_ShadowCascade shadow_cascade_data[MAX_SHADOW_CASCADE]
struct EEVEE_LightsInfo::@199 shcaster_aabb
struct GHash * geom
struct EEVEE_MotionBlurData::@200 camera[3]
struct GHash * object
DRWShadingGroup * hair_grp
EEVEE_LightProbeVisTest * test_data
struct Object * ob
struct Object * parent
float obmat[3][4][4]
struct DRWPass * material_sss_ps
struct DRWPass * dof_reduce_copy
struct DRWPass * bloom_resolve
struct DRWPass * probe_planar_downsample_ps
struct DRWPass * velocity_object
struct DRWPass * dof_setup
struct DRWPass * transparent_pass
struct DRWPass * dof_gather_bg
struct DRWPass * lookdev_diffuse_pass
struct DRWPass * sss_resolve_ps
struct DRWPass * depth_cull_ps
struct DRWPass * ao_accum_ps
struct DRWPass * dof_bokeh
struct DRWPass * dof_gather_fg
struct DRWPass * depth_refract_ps
struct DRWPass * depth_clip_ps
struct DRWPass * sss_blur_ps
struct DRWPass * bloom_upsample
struct DRWPass * material_accum_ps
struct DRWPass * depth_ps
struct DRWPass * sss_translucency_ps
struct DRWPass * alpha_checker
struct DRWPass * velocity_tiles
struct DRWPass * depth_clip_cull_ps
struct DRWPass * material_refract_ps
struct DRWPass * dof_gather_fg_holefill
struct DRWPass * maxz_copydepth_ps
struct DRWPass * depth_refract_clip_cull_ps
struct DRWPass * motion_blur
struct DRWPass * velocity_tiles_expand[2]
struct DRWPass * maxz_copydepth_layer_ps
struct DRWPass * material_sss_cull_ps
struct DRWPass * probe_background
struct DRWPass * dof_scatter_fg
struct DRWPass * dof_scatter_bg
struct DRWPass * volumetric_objects_ps
struct DRWPass * probe_diffuse_compute
struct DRWPass * volumetric_integration_ps
struct DRWPass * velocity_resolve
struct DRWPass * ssr_resolve
struct DRWPass * velocity_tiles_x
struct DRWPass * dof_reduce
struct DRWPass * depth_refract_cull_ps
struct DRWPass * shadow_accum_pass
struct DRWPass * material_ps
struct DRWPass * depth_refract_clip_ps
struct DRWPass * renderpass_pass
struct DRWPass * maxz_downlevel_ps
struct DRWPass * bloom_downsample_first
struct DRWPass * probe_display
struct DRWPass * probe_glossy_compute
struct DRWPass * volumetric_world_ps
struct DRWPass * bloom_blit
struct DRWPass * color_copy_ps
struct DRWPass * dof_downsample
struct DRWPass * lookdev_glossy_pass
struct DRWPass * bloom_accum_ps
struct DRWPass * dof_flatten_tiles
struct DRWPass * mist_accum_ps
struct DRWPass * background_accum_ps
struct DRWPass * probe_grid_fill
struct DRWPass * ao_horizon_search
struct DRWPass * velocity_hair
struct DRWPass * dof_resolve
struct DRWPass * update_noise_pass
struct DRWPass * cryptomatte_ps
struct DRWPass * taa_resolve
struct DRWPass * ssr_raytrace
struct DRWPass * shadow_pass
struct DRWPass * ao_horizon_debug
struct DRWPass * color_downsample_cube_ps
struct DRWPass * material_cull_ps
struct DRWPass * probe_visibility_compute
struct DRWPass * dof_dilate_tiles_minmax
struct DRWPass * dof_dilate_tiles_minabs
struct DRWPass * volumetric_scatter_ps
struct DRWPass * material_refract_cull_ps
struct DRWPass * volumetric_resolve_ps
struct DRWPass * volumetric_accum_ps
struct DRWPass * dof_filter
struct DRWPass * background_ps
struct DRWPass * color_downsample_ps
struct DRWPass * bloom_downsample
float planar_texel_size[2]
struct DRWView * bake_views[6]
struct GPUUniformBuf * renderpass_ubo
eViewLayerEEVEEPassType render_passes
EEVEE_CryptomatteSample * cryptomatte_accum_buffer
float studiolight_glossy_clamp
struct DRWView * cube_views[6]
struct DRWShadingGroup * shadow_accum_shgrp
struct DRWView * world_views[6]
struct DRWShadingGroup * shadow_shgrp
GPUTexture * renderpass_light_input
struct CryptomatteSession * cryptomatte_session
struct LightCache * light_cache
struct GHash * material_hash
struct Object * cam_original_ob
float * cryptomatte_download_buffer
GPUTexture * renderpass_input
struct DRWView * planar_views[MAX_PLANAR]
float studiolight_filter_quality
GPUTexture * renderpass_col_input
int render_sample_count_per_timestep
float studiolight_matrix[3][3]
struct DRWCallBuffer * planar_display_shgrp
GPUTexture * renderpass_transmittance_input
float projmat[MAX_CASCADE_NUM][4][4]
float radius[MAX_CASCADE_NUM]
float shadowmat[MAX_CASCADE_NUM][4][4]
float shadowmat[4][4]
float contact_bias
float type_data_id
float contact_thickness
float contact_spread
float contact_dist
LightCacheTexture * lookdev_cube_mips
EEVEE_LightProbe * lookdev_cube_data
struct EEVEE_PrivateData * g_data
struct EEVEE_EffectsInfo * effects
EEVEE_LightGrid * lookdev_grid_data
struct LightCache * lookdev_lightcache
struct GPUTexture * filtered_radiance
struct GPUTexture * depth_double_buffer
struct GPUTexture * planar_depth
struct GPUTexture * sss_accum
struct GPUTexture * color_double_buffer
struct GPUTexture * spec_color_accum
struct GPUTexture * volume_scatter_history
struct GPUTexture * dof_reduced_coc
struct GPUTexture * maxzbuffer
struct GPUTexture * color_post
struct GPUTexture * volume_prop_extinction
struct GPUTexture * diff_light_accum
struct GPUTexture * emit_accum
struct GPUTexture * planar_pool
struct GPUTexture * renderpass
struct GPUTexture * lookdev_cube_tx
struct GPUTexture * volume_scatter_accum
struct GPUTexture * diff_color_accum
struct GPUTexture * dof_reduced_color
struct GPUTexture * ao_accum
struct GPUTexture * bloom_accum
struct GPUTexture * spec_light_accum
struct GPUTexture * lookdev_grid_tx
struct GPUTexture * volume_transmittance_accum
struct GPUTexture * volume_prop_emission
struct GPUTexture * volume_transmit
struct GPUTexture * taa_history
struct GPUTexture * color
struct GPUTexture * cryptomatte
struct GPUTexture * shadow_accum
struct GPUTexture * mist_accum
struct GPUTexture * volume_transmit_history
struct GPUTexture * volume_prop_phase
struct GPUTexture * env_accum
struct GPUTexture * aov_surface_accum[MAX_AOVS]
struct GPUTexture * volume_prop_scattering
struct GPUTexture * volume_scatter
struct GPUTexture * ssr_accum
struct EEVEE_CommonUniformBuffer common_data
struct GPUTexture * shadow_cube_pool
struct GPUUniformBuf * combined
struct GPUUniformBuf * diff_light
struct GPUUniformBuf * shadow_ubo
struct GPUUniformBuf * probe_ubo
struct GPUUniformBuf * shadow_samples_ubo
struct GPUUniformBuf * grid_ubo
struct GPUUniformBuf * emit
struct GPUFrameBuffer * shadow_fb
struct GPUUniformBuf * planar_ubo
struct GPUUniformBuf * spec_color
struct EEVEE_ViewLayerData::@202 renderpass_ubo
struct GPUUniformBuf * environment
struct LightCache * fallback_lightcache
struct GPUUniformBuf * diff_color
struct GPUUniformBuf * spec_light
struct GPUUniformBuf * common_ubo
struct BLI_memblock * material_cache
struct GPUUniformBuf * light_ubo
struct GPUUniformBuf * aovs[MAX_AOVS]
struct GPUTexture * shadow_cascade_pool
struct EEVEE_ShadowCasterBuffer shcasters_buffers[2]
struct EEVEE_LightsInfo * lights
struct EEVEE_LightProbesInfo * probes
Material * ma
Definition: gpu_material.c:67
GPUPass * pass
Definition: gpu_material.c:79
Definition: DNA_ID.h:273
View3DOverlay overlay
View3DShading shading