74 this->initialized = other.initialized;
75 this->used = other.used;
76 this->directional = other.directional;
77 this->punctual = other.punctual;
78 this->shadow_set_membership = other.shadow_set_membership;
79 other.directional =
nullptr;
80 other.punctual =
nullptr;
106 float attenuation_radius_get(
const blender::Light *la,
float light_threshold,
float light_power);
112 float shape_radiance_get();
113 float point_radiance_get();
130 static constexpr uint max_memory_threshold = 32 * 1024 * 1024;
131 static constexpr uint max_word_count_threshold = max_memory_threshold /
sizeof(
uint);
132 static constexpr uint max_tile_count_threshold = 8192;
147 float light_threshold_ = 0.01f;
149 bool use_scene_lights_ =
false;
151 bool use_sun_lights_ =
false;
153 int sun_lights_len_ = 0;
154 int local_lights_len_ = 0;
177 uint total_word_count_ = 0;
179 bool view_is_flipped_ =
false;
184 PassSimple shape_display_ps_ = {
"Light.ShapeDisplay"};
187 PassSimple debug_draw_ps_ = {
"LightCulling.Debug"};
214 void culling_pass_sync();
215 void update_pass_sync();
216 void shape_display_pass_sync();
217 void debug_pass_sync();
219 void add_world_sun_light(
const ObjectKey &key,
bool use_diffuse,
bool use_glossy);
NonCopyable(const NonCopyable &other)=delete
A running instance of the engine.
LightModule(Instance &inst)
void sync_light(const ObjectRef &ob_ref)
void set_view(View &view, const int2 extent)
void bind_resources(PassType &pass)
void shape_display_draw(View &view, gpu::FrameBuffer *view_fb)
void debug_draw(View &view, gpu::FrameBuffer *view_fb)
#define LIGHT_ZBIN_BUF_SLOT
#define LIGHT_TILE_BUF_SLOT
#define LIGHT_CULL_BUF_SLOT
float3x3 scale(float3x3 mat, float2 scale)
detail::Pass< command::DrawCommandBuf > PassSimple
draw::StorageArrayBuffer< LightData, LIGHT_CHUNK > LightDataBuf
draw::StorageArrayBuffer< uint, CULLING_ZBIN_COUNT, true > LightCullingZbinBuf
draw::StorageArrayBuffer< float, LIGHT_CHUNK, true > LightCullingZdistBuf
draw::StorageArrayBuffer< uint, LIGHT_CHUNK, true > LightCullingTileBuf
draw::StorageBuffer< LightCullingData > LightCullingDataBuf
draw::StorageArrayBuffer< uint, LIGHT_CHUNK, true > LightCullingKeyBuf
VecBase< uint32_t, 2 > uint2
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
unsigned __int64 uint64_t
MatBase< float, 4, 4 > float4x4
VecBase< int32_t, 2 > int2
VecBase< float, 3 > float3
struct Transform object_to_world
uint2 light_set_membership
void sync(ShadowModule &shadows, float4x4 object_to_world, char visibility_flag, const blender::Light *la, uint64_t light_set_membership, uint64_t shadow_set_membership, float threshold)
void shadow_discard_safe(ShadowModule &shadows)
ShadowDirectional * directional
void shadow_ensure(ShadowModule &shadows)
uint2 shadow_set_membership
ShadowPunctual * punctual