feat(mirror): copy volumetric-disk params into uniform each frame
Extends mirror_params with the 9 new field assignments. DiskQuality enum gains an as_u32() accessor for the WGSL tier selector. GPU now receives live values; shader does not consume them yet.
This commit is contained in:
parent
35ae3ce5cc
commit
827edd35a2
@ -44,6 +44,16 @@ impl DiskQuality {
|
|||||||
DiskQuality::High => (5, 4, 3),
|
DiskQuality::High => (5, 4, 3),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Tier as a u32 for the WGSL uniform selector.
|
||||||
|
pub fn as_u32(self) -> u32 {
|
||||||
|
match self {
|
||||||
|
DiskQuality::Off => 0,
|
||||||
|
DiskQuality::Low => 1,
|
||||||
|
DiskQuality::Medium => 2,
|
||||||
|
DiskQuality::High => 3,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// All tunable black-hole parameters. Edited by the egui panel (Task 17),
|
/// All tunable black-hole parameters. Edited by the egui panel (Task 17),
|
||||||
|
|||||||
@ -620,6 +620,15 @@ fn mirror_params(
|
|||||||
u.bloom_threshold = params.bloom_threshold;
|
u.bloom_threshold = params.bloom_threshold;
|
||||||
u.bloom_strength = params.bloom_strength;
|
u.bloom_strength = params.bloom_strength;
|
||||||
u.exposure = params.exposure;
|
u.exposure = params.exposure;
|
||||||
|
u.disk_half_thickness = params.disk_half_thickness;
|
||||||
|
u.filament_freq = params.filament_freq;
|
||||||
|
u.filament_sharpness = params.filament_sharpness;
|
||||||
|
u.density_freq = params.density_freq;
|
||||||
|
u.density_strength = params.density_strength;
|
||||||
|
u.arm_count = params.arm_count;
|
||||||
|
u.arm_tightness = params.arm_tightness;
|
||||||
|
u.arm_strength = params.arm_strength;
|
||||||
|
u.disk_quality = params.disk_quality.as_u32();
|
||||||
}
|
}
|
||||||
// Update brightpass threshold (live-tunable).
|
// Update brightpass threshold (live-tunable).
|
||||||
for (_, mat) in brightpass_materials.iter_mut() {
|
for (_, mat) in brightpass_materials.iter_mut() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user