Add a threshold option (enabled by default) for bloom.
Threshold can be either on or off, and only thresholds at 1.0 when activated (in pre-exposed mode). This allows to use very high strengths values for the bloom without softening the rest of the image, and is useful for artistic considerations.
This commit is contained in:
committed by
Mathias Agopian
parent
34dcc90ac7
commit
b17c51e340
@@ -250,7 +250,7 @@ Java_com_google_android_filament_View_nSetAmbientOcclusionOptions(JNIEnv*, jclas
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_View_nSetBloomOptions(JNIEnv*, jclass,
|
||||
jlong nativeView, jfloat strength, jint resolution, jfloat anamorphism, jint levels,
|
||||
jint blendMode, jboolean enabled) {
|
||||
jint blendMode, jboolean threshold, jboolean enabled) {
|
||||
View* view = (View*) nativeView;
|
||||
View::BloomOptions options = {
|
||||
.strength = strength,
|
||||
@@ -258,6 +258,7 @@ Java_com_google_android_filament_View_nSetBloomOptions(JNIEnv*, jclass,
|
||||
.anamorphism = anamorphism,
|
||||
.levels = (uint8_t)levels,
|
||||
.blendMode = (View::BloomOptions::BlendMode)blendMode,
|
||||
.threshold = (bool)threshold,
|
||||
.enabled = (bool)enabled
|
||||
};
|
||||
view->setBloomOptions(options);
|
||||
|
||||
Reference in New Issue
Block a user