60 this->initialized = other.initialized;
61 this->used = other.used;
62 this->directional = other.directional;
63 this->punctual = other.punctual;
64 other.directional =
nullptr;
65 other.punctual =
nullptr;
88 float shadow_lod_min_get(const ::Light *la);
89 float shadow_shape_size_get(const ::Light *la);
90 float attenuation_radius_get(const ::Light *la,
float light_threshold,
float light_power);
91 void shape_parameters_set(const ::Light *la,
96 float shape_radiance_get();
97 float point_radiance_get();
114 static constexpr uint max_memory_threshold = 32 * 1024 * 1024;
115 static constexpr uint max_word_count_threshold = max_memory_threshold /
sizeof(
uint);
116 static constexpr uint max_tile_count_threshold = 8192;
126 float light_threshold_ = 0.01f;
128 bool use_scene_lights_ =
false;
130 bool use_sun_lights_ =
false;
132 int sun_lights_len_ = 0;
133 int local_lights_len_ = 0;
156 uint total_word_count_ = 0;
158 bool view_is_flipped_ =
false;
164 PassSimple debug_draw_ps_ = {
"LightCulling.Debug"};
190 void culling_pass_sync();
191 void update_pass_sync();
192 void debug_pass_sync();
NonCopyable(const NonCopyable &other)=delete
A running instance of the engine.
LightModule(Instance &inst)
void sync_light(const Object *ob, ObjectHandle &handle)
void set_view(View &view, const int2 extent)
void bind_resources(PassType &pass)
void debug_draw(View &view, GPUFrameBuffer *view_fb)
#define LIGHT_ZBIN_BUF_SLOT
#define LIGHT_TILE_BUF_SLOT
#define LIGHT_CULL_BUF_SLOT
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
MatBase< T, NumCol, NumRow > scale(const MatBase< T, NumCol, NumRow > &mat, const VectorT &scale)
MatBase< float, 4, 4 > float4x4
VecBase< int32_t, 2 > int2
VecBase< float, 3 > float3
void shadow_discard_safe(ShadowModule &shadows)
ShadowDirectional * directional
void shadow_ensure(ShadowModule &shadows)
void sync(ShadowModule &shadows, float4x4 object_to_world, char visibility_flag, const ::Light *la, const LightLinking *light_linking, float threshold)
ShadowPunctual * punctual