71 this->initialized = other.initialized;
72 this->used = other.used;
73 this->directional = other.directional;
74 this->punctual = other.punctual;
75 other.directional =
nullptr;
76 other.punctual =
nullptr;
99 float shadow_lod_min_get(const ::Light *la);
100 float shadow_shape_size_get(const ::Light *la);
101 float attenuation_radius_get(const ::Light *la,
float light_threshold,
float light_power);
102 void shape_parameters_set(const ::Light *la,
107 float shape_radiance_get();
108 float point_radiance_get();
125 static constexpr uint max_memory_threshold = 32 * 1024 * 1024;
126 static constexpr uint max_word_count_threshold = max_memory_threshold /
sizeof(
uint);
127 static constexpr uint max_tile_count_threshold = 8192;
137 float light_threshold_ = 0.01f;
139 bool use_scene_lights_ =
false;
141 bool use_sun_lights_ =
false;
143 int sun_lights_len_ = 0;
144 int local_lights_len_ = 0;
167 uint total_word_count_ = 0;
169 bool view_is_flipped_ =
false;
175 PassSimple debug_draw_ps_ = {
"LightCulling.Debug"};
201 void culling_pass_sync();
202 void update_pass_sync();
203 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, gpu::FrameBuffer *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