Add IndirectLight::radiance()
This allows to specify the irradiance by providing only the radiance as SH, which might be easier in some case.
This commit is contained in:
committed by
Mathias Agopian
parent
4e4f7fd4ac
commit
6620edebb3
@@ -57,6 +57,15 @@ Java_com_google_android_filament_IndirectLight_nIrradiance(JNIEnv* env, jclass,
|
||||
env->ReleaseFloatArrayElements(sh_, sh, JNI_ABORT);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_IndirectLight_nRadiance(JNIEnv* env, jclass,
|
||||
jlong nativeBuilder, jint bands, jfloatArray sh_) {
|
||||
IndirectLight::Builder* builder = (IndirectLight::Builder*) nativeBuilder;
|
||||
jfloat* sh = env->GetFloatArrayElements(sh_, NULL);
|
||||
builder->radiance((uint8_t) bands, (const filament::math::float3*) sh);
|
||||
env->ReleaseFloatArrayElements(sh_, sh, JNI_ABORT);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_IndirectLight_nIrradianceAsTexture(JNIEnv*, jclass,
|
||||
jlong nativeBuilder, jlong nativeTexture) {
|
||||
|
||||
Reference in New Issue
Block a user