Added a quality level parameter for SSAO
Currently it only selects how many samples are used. Low,medium,high and ultra respectively map to 7,11,16 and 32 samples. The default is "low", which is sufficient for most mobile applications.
This commit is contained in:
committed by
Mathias Agopian
parent
31a4ef10e1
commit
675012a2eb
@@ -235,14 +235,16 @@ Java_com_google_android_filament_View_nGetAmbientOcclusion(JNIEnv*, jclass, jlon
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_View_nSetAmbientOcclusionOptions(JNIEnv*, jclass,
|
||||
jlong nativeView, jfloat radius, jfloat bias, jfloat power, jfloat resolution, jfloat intensity) {
|
||||
jlong nativeView, jfloat radius, jfloat bias, jfloat power, jfloat resolution, jfloat intensity,
|
||||
jint quality) {
|
||||
View* view = (View*) nativeView;
|
||||
View::AmbientOcclusionOptions options = {
|
||||
.radius = radius,
|
||||
.power = power,
|
||||
.bias = bias,
|
||||
.resolution = resolution,
|
||||
.intensity = intensity
|
||||
.intensity = intensity,
|
||||
.quality = (View::QualityLevel)quality
|
||||
};
|
||||
view->setAmbientOcclusionOptions(options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user