Add a way to set the shadow sampling quality

FIXES=[379754325]
This commit is contained in:
Mathias Agopian
2024-12-17 16:07:40 -08:00
committed by Mathias Agopian
parent 6a547639d1
commit 377a1106aa
7 changed files with 61 additions and 16 deletions
@@ -25,13 +25,14 @@ using namespace filament;
extern "C" JNIEXPORT jlong JNICALL
Java_com_google_android_filament_Material_nBuilderBuild(JNIEnv *env, jclass,
jlong nativeEngine, jobject buffer_, jint size, jint shBandCount) {
jlong nativeEngine, jobject buffer_, jint size, jint shBandCount, jint shadowQuality) {
Engine* engine = (Engine*) nativeEngine;
AutoBuffer buffer(env, buffer_, size);
auto builder = Material::Builder();
if (shBandCount) {
builder.sphericalHarmonicsBandCount(shBandCount);
}
builder.shadowSamplingQuality((Material::Builder::ShadowSamplingQuality)shadowQuality);
Material* material = builder
.package(buffer.getData(), buffer.getSize())
.build(*engine);