Add vignette post-processing effect (#2743)
* Add a vignette post-processing effect * Use numeric limits instead of hard coded values
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include <filament/Color.h>
|
||||
#include <filament/View.h>
|
||||
#include <filament/Viewport.h>
|
||||
|
||||
@@ -258,3 +259,12 @@ Java_com_google_android_filament_View_nSetDepthOfFieldOptions(JNIEnv *, jclass ,
|
||||
view->setDepthOfFieldOptions({.focusDistance = focusDistance, .blurScale = blurScale,
|
||||
.maxApertureDiameter = maxApertureDiameter, .enabled = (bool)enabled});
|
||||
}
|
||||
|
||||
extern "C"
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_View_nSetVignetteOptions(JNIEnv*, jclass, jlong nativeView, jfloat midPoint, jfloat roundness,
|
||||
jfloat feather, jfloat r, jfloat g, jfloat b, jfloat a, jboolean enabled) {
|
||||
View* view = (View*) nativeView;
|
||||
view->setVignetteOptions({.midPoint = midPoint, .roundness = roundness, .feather = feather,
|
||||
.color = LinearColorA{r, g, b, a}, .enabled = (bool)enabled});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user