40 Texture probes_tx_ = {
"Probes"};
43 PassSimple remap_ps_ = {
"Probe.CubemapToOctahedral"};
45 PassSimple sum_sh_ps_ = {
"Probe.SumSphericalHarmonics"};
47 PassSimple sum_sun_ps_ = {
"Probe.SumSunlight"};
53 GPUTexture *convolve_input_ =
nullptr;
55 GPUTexture *convolve_output_ =
nullptr;
56 int convolve_lod_ = 0;
58 bool extract_sh_ =
false;
61 int3 dispatch_probe_convolve_ =
int3(1);
62 int3 dispatch_probe_select_ =
int3(1);
69 Texture cubemap_tx_ = {
"Probe.Cubemap"};
73 SphereProbeUvArea probe_sampling_coord_;
74 SphereProbePixelArea probe_write_coord_;
76 SphereProbePixelArea probe_read_coord_;
78 SphereProbeUvArea world_sampling_coord_;
80 int lightprobe_sphere_count_ = 0;
83 StorageArrayBuffer<SphereProbeHarmonic, SPHERE_PROBE_MAX_HARMONIC, true>
84 tmp_spherical_harmonics_ = {
"tmp_spherical_harmonics_"};
86 StorageBuffer<SphereProbeHarmonic, true> spherical_harmonics_ = {
"spherical_harmonics_"};
89 StorageArrayBuffer<SphereProbeSunLight, SPHERE_PROBE_MAX_HARMONIC, true> tmp_sunlight_ = {
99 bool update_probes_next_sample_ =
false;
101 bool update_probes_this_sample_ =
false;
103 bool do_world_irradiance_update =
true;
106 bool do_display_draw_ =
false;
108 PassSimple viewport_display_ps_ = {
"ProbeSphereModule.Viewport Display"};
140 return spherical_harmonics_;
160 void ensure_cubemap_render_target(
int resolution);
165 int cube_target_extent;
167 float2 clipping_distances;
169 SphereProbeAtlasCoord atlas_coord;
174 UpdateInfo update_info_from_probe(SphereProbe &probe);
179 std::optional<UpdateInfo> world_update_info_pop();
180 std::optional<UpdateInfo> probe_update_info_pop();
188 void remap_to_octahedral_projection(
const SphereProbeAtlasCoord &atlas_coord,
189 bool extract_spherical_harmonics);
191 void sync_display(Vector<SphereProbe *> &probe_active);