More improvements to SSAO
- we add an 'intensity' parameter that allows to control the strength of the AO effect. This is useful for aesthetic reasons. - the default intensity is now 2x that of before this change, which makes the intensity parameter match AO papers this implementation is inspired of. - bias is now z-dependent, which reduces some self shadowing wrt the depth.
This commit is contained in:
committed by
Mathias Agopian
parent
5583dc26f9
commit
0da551c7fd
@@ -241,8 +241,14 @@ 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) {
|
||||
jlong nativeView, jfloat radius, jfloat bias, jfloat power, jfloat resolution, jfloat intensity) {
|
||||
View* view = (View*) nativeView;
|
||||
View::AmbientOcclusionOptions options = { .radius = radius, .bias = bias, .power = power, .resolution = resolution};
|
||||
View::AmbientOcclusionOptions options = {
|
||||
.radius = radius,
|
||||
.bias = bias,
|
||||
.power = power,
|
||||
.resolution = resolution,
|
||||
.intensity = intensity
|
||||
};
|
||||
view->setAmbientOcclusionOptions(options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user