1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
/*
* Copyright 2016, Blender Foundation.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Institute
*
*/
/** \file eevee_private.h
* \ingroup DNA
*/
struct Object;
/* keep it under MAX_PASSES */
typedef struct EEVEE_PassList {
struct DRWPass *depth_pass;
struct DRWPass *depth_pass_cull;
struct DRWPass *pass;
struct DRWPass *tonemap;
} EEVEE_PassList;
/* keep it under MAX_BUFFERS */
typedef struct EEVEE_FramebufferList {
struct GPUFrameBuffer *main; /* HDR */
} EEVEE_FramebufferList;
/* keep it under MAX_TEXTURES */
typedef struct EEVEE_TextureList {
struct GPUTexture *color; /* R11_G11_B10 */
} EEVEE_TextureList;
/* keep it under MAX_STORAGE */
typedef struct EEVEE_StorageList {
/* Lights */
struct EEVEE_LightsInfo *lights_info; /* Number of lights, ... */
struct EEVEE_Light *lights_data; /* Array, Packed lights data info, duplication of what is in the Uniform Buffer in Vram */
struct Object **lights_ref; /* List of all lights in the buffer. */
struct GPUUniformBuffer *lights_ubo;
struct g_data *g_data;
} EEVEE_StorageList;
typedef struct EEVEE_LightsInfo {
int light_count;
} EEVEE_LightsInfo;
typedef struct EEVEE_Data {
void *engine_type;
EEVEE_FramebufferList *fbl;
EEVEE_TextureList *txl;
EEVEE_PassList *psl;
EEVEE_StorageList *stl;
} EEVEE_Data;
typedef struct g_data{
struct DRWShadingGroup *default_lit_grp;
struct DRWShadingGroup *depth_shgrp;
struct DRWShadingGroup *depth_shgrp_select;
struct DRWShadingGroup *depth_shgrp_active;
struct DRWShadingGroup *depth_shgrp_cull;
struct DRWShadingGroup *depth_shgrp_cull_select;
struct DRWShadingGroup *depth_shgrp_cull_active;
struct ListBase lamps; /* Lamps gathered during cache iteration */
} g_data; /* Transient data */
/* eevee_lights.c */
void EEVEE_lights_init(EEVEE_StorageList *stl);
void EEVEE_lights_cache_init(EEVEE_StorageList *stl);
void EEVEE_lights_cache_add(EEVEE_StorageList *stl, struct Object *ob);
void EEVEE_lights_cache_finish(EEVEE_StorageList *stl);
void EEVEE_lights_update(EEVEE_StorageList *stl);
|