add toggle for postprocessing and minor cleanup work

This commit is contained in:
Nick Fisher
2023-10-03 22:04:37 +08:00
parent d49b43c191
commit c1f8eae85e
189 changed files with 568 additions and 146 deletions

View File

@@ -642,7 +642,7 @@ class FilamentControllerFFI extends FilamentController {
}
///
/// Sets the tone mapping.
/// Sets the tone mapping (requires postprocessing).
///
@override
Future setToneMapping(ToneMapper mapper) async {
@@ -653,6 +653,18 @@ class FilamentControllerFFI extends FilamentController {
_lib.set_tone_mapping_ffi(_viewer!, mapper.index);
}
///
/// Enable/disable postprocessing.
///
@override
Future setPostProcessing(bool enabled) async {
if (_viewer == null || _resizing) {
throw Exception("No viewer available, ignoring");
}
_lib.set_post_processing_ffi(_viewer!, enabled);
}
///
/// Sets the strength of the bloom.
///