Skip to content

Commit f0a8dc5

Browse files
committed
Merge branch 'rc/1.69.2' into release
2 parents 3d4e725 + fd7baed commit f0a8dc5

File tree

157 files changed

+10236
-2142
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+10236
-2142
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,7 @@ jobs:
163163
mv out/filamat-android-release.aar out/filamat-${TAG}-android.aar
164164
mv out/gltfio-android-release.aar out/gltfio-${TAG}-android.aar
165165
mv out/filament-utils-android-release.aar out/filament-utils-${TAG}-android.aar
166-
cd out/android-release/filament
167-
tar -czf ../../filament-${TAG}-android-native.tgz .
168-
cd ../../..
166+
mv out/filament-android-release-linux.tgz out/filament-${TAG}-android-native.tgz
169167
- name: Sign sample-gltf-viewer
170168
run: |
171169
echo "${APK_KEYSTORE_BASE64}" > filament.jks.base64

CMakeLists.txt

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ option(FILAMENT_ENABLE_COVERAGE "Enable LLVM code coverage" OFF)
4949

5050
option(FILAMENT_ENABLE_FEATURE_LEVEL_0 "Enable Feature Level 0" ON)
5151

52-
option(FILAMENT_ENABLE_MULTIVIEW "Enable multiview for Filament" OFF)
53-
5452
option(FILAMENT_SUPPORTS_OSMESA "Enable OSMesa (headless GL context) for Filament" OFF)
5553

5654
option(FILAMENT_ENABLE_FGVIEWER "Enable the frame graph viewer" OFF)
@@ -607,23 +605,6 @@ else()
607605
option(FILAMENT_DISABLE_MATOPT "Disable material optimizations" ON)
608606
endif()
609607

610-
# This only affects the prebuilt shader files in gltfio and samples, not filament library.
611-
# The value can be either "instanced", "multiview", or "none"
612-
set(FILAMENT_SAMPLES_STEREO_TYPE "none" CACHE STRING
613-
"Stereoscopic type that shader files in gltfio and samples are built for."
614-
)
615-
string(TOLOWER "${FILAMENT_SAMPLES_STEREO_TYPE}" FILAMENT_SAMPLES_STEREO_TYPE)
616-
if (NOT FILAMENT_SAMPLES_STEREO_TYPE STREQUAL "instanced"
617-
AND NOT FILAMENT_SAMPLES_STEREO_TYPE STREQUAL "multiview"
618-
AND NOT FILAMENT_SAMPLES_STEREO_TYPE STREQUAL "none")
619-
message(FATAL_ERROR "Invalid stereo type: \"${FILAMENT_SAMPLES_STEREO_TYPE}\" choose either \"instanced\", \"multiview\", or \"none\" ")
620-
endif ()
621-
622-
# Compiling samples for multiview implies enabling multiview feature as well.
623-
if (FILAMENT_SAMPLES_STEREO_TYPE STREQUAL "multiview")
624-
set(FILAMENT_ENABLE_MULTIVIEW ON)
625-
endif ()
626-
627608
# Define backend flag for debug only
628609
if (CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT FILAMENT_BACKEND_DEBUG_FLAG STREQUAL "")
629610
add_definitions(-DFILAMENT_BACKEND_DEBUG_FLAG=${FILAMENT_BACKEND_DEBUG_FLAG})
@@ -877,6 +858,7 @@ add_subdirectory(${LIBRARIES}/gltfio)
877858
add_subdirectory(${LIBRARIES}/ibl)
878859
add_subdirectory(${LIBRARIES}/iblprefilter)
879860
add_subdirectory(${LIBRARIES}/image)
861+
add_subdirectory(${LIBRARIES}/imagediff)
880862
add_subdirectory(${LIBRARIES}/ktxreader)
881863
add_subdirectory(${LIBRARIES}/math)
882864
add_subdirectory(${LIBRARIES}/mathio)
@@ -903,6 +885,8 @@ add_subdirectory(${EXTERNAL}/getopt)
903885
add_subdirectory(${EXTERNAL}/perfetto/tnt)
904886
add_subdirectory(${EXTERNAL}/basisu/tnt)
905887

888+
# imageio-lite is needed for viewer
889+
add_subdirectory(${LIBRARIES}/imageio-lite)
906890

907891
# Note that this has to be placed after mikktspace in order for combine_static_libs to work.
908892
add_subdirectory(${LIBRARIES}/geometry)

NEW_RELEASE_NOTES.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,3 @@
66
appropriate header in [RELEASE_NOTES.md](./RELEASE_NOTES.md).
77

88
## Release notes for next branch cut
9-
10-
- engine: fix shader compilation failure in TAA material
11-
- engine: fix stereo & parallel shader compilation

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ repositories {
3131
}
3232
3333
dependencies {
34-
implementation 'com.google.android.filament:filament-android:1.69.1'
34+
implementation 'com.google.android.filament:filament-android:1.69.2'
3535
}
3636
```
3737

@@ -51,7 +51,7 @@ Here are all the libraries available in the group `com.google.android.filament`:
5151
iOS projects can use CocoaPods to install the latest release:
5252

5353
```shell
54-
pod 'Filament', '~> 1.69.1'
54+
pod 'Filament', '~> 1.69.2'
5555
```
5656

5757
## Documentation

RELEASE_NOTES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ A new header is inserted each time a *tag* is created.
77
Instead, if you are authoring a PR for the main branch, add your release note to
88
[NEW_RELEASE_NOTES.md](./NEW_RELEASE_NOTES.md).
99

10+
## v1.69.2
11+
12+
- engine: fix shader compilation failure in TAA material
13+
- engine: fix stereo & parallel shader compilation
14+
1015
## v1.69.1
1116

1217

android/filament-android/src/main/cpp/Camera.cpp

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include <filament/Camera.h>
2020

21+
2122
#include <utils/Entity.h>
2223

2324
#include <math/mat4.h>
@@ -40,6 +41,13 @@ Java_com_google_android_filament_Camera_nSetProjectionFov(JNIEnv*, jclass ,
4041
camera->setProjection(fovInDegrees, aspect, near, far, (Camera::Fov) fov);
4142
}
4243

44+
extern "C" JNIEXPORT jdouble JNICALL
45+
Java_com_google_android_filament_Camera_nGetFieldOfViewInDegrees(JNIEnv*, jclass,
46+
jlong nativeCamera, jint direction) {
47+
Camera *camera = (Camera *) nativeCamera;
48+
return camera->getFieldOfViewInDegrees((Camera::Fov) direction);
49+
}
50+
4351
extern "C" JNIEXPORT void JNICALL
4452
Java_com_google_android_filament_Camera_nSetLensProjection(JNIEnv*, jclass,
4553
jlong nativeCamera, jdouble focalLength, jdouble aspect, jdouble near, jdouble far) {
@@ -62,6 +70,21 @@ Java_com_google_android_filament_Camera_nSetCustomProjection(JNIEnv *env, jclass
6270
env->ReleaseDoubleArrayElements(inProjectionForCulling_, inProjectionForCulling, JNI_ABORT);
6371
}
6472

73+
extern "C" JNIEXPORT void JNICALL
74+
Java_com_google_android_filament_Camera_nSetCustomEyeProjection(JNIEnv *env, jclass,
75+
jlong nativeCamera, jdoubleArray inProjection_, jint count, jdoubleArray inProjectionForCulling_,
76+
jdouble near, jdouble far) {
77+
Camera *camera = (Camera *) nativeCamera;
78+
jdouble *inProjection = env->GetDoubleArrayElements(inProjection_, NULL);
79+
jdouble *inProjectionForCulling = env->GetDoubleArrayElements(inProjectionForCulling_, NULL);
80+
camera->setCustomEyeProjection(
81+
reinterpret_cast<const filament::math::mat4 *>(inProjection), (size_t) count,
82+
*reinterpret_cast<const filament::math::mat4 *>(inProjectionForCulling),
83+
near, far);
84+
env->ReleaseDoubleArrayElements(inProjection_, inProjection, JNI_ABORT);
85+
env->ReleaseDoubleArrayElements(inProjectionForCulling_, inProjectionForCulling, JNI_ABORT);
86+
}
87+
6588
extern "C" JNIEXPORT void JNICALL
6689
Java_com_google_android_filament_Camera_nSetScaling(JNIEnv* env, jclass,
6790
jlong nativeCamera, jdouble x, jdouble y) {
@@ -76,6 +99,17 @@ Java_com_google_android_filament_Camera_nSetShift(JNIEnv* env, jclass,
7699
camera->setShift({(double)x, (double)y});
77100
}
78101

102+
extern "C" JNIEXPORT void JNICALL
103+
Java_com_google_android_filament_Camera_nGetShift(JNIEnv* env, jclass,
104+
jlong nativeCamera, jdoubleArray out_) {
105+
Camera *camera = (Camera *) nativeCamera;
106+
jdouble *out = env->GetDoubleArrayElements(out_, NULL);
107+
filament::math::double2 s = camera->getShift();
108+
out[0] = s.x;
109+
out[1] = s.y;
110+
env->ReleaseDoubleArrayElements(out_, out, 0);
111+
}
112+
79113
extern "C" JNIEXPORT void JNICALL
80114
Java_com_google_android_filament_Camera_nLookAt(JNIEnv*, jclass, jlong nativeCamera,
81115
jdouble eye_x, jdouble eye_y, jdouble eye_z, jdouble center_x, jdouble center_y,
@@ -115,6 +149,15 @@ Java_com_google_android_filament_Camera_nSetModelMatrixFp64(JNIEnv *env, jclass,
115149
env->ReleaseDoubleArrayElements(in_, in, JNI_ABORT);
116150
}
117151

152+
extern "C" JNIEXPORT void JNICALL
153+
Java_com_google_android_filament_Camera_nSetEyeModelMatrix(JNIEnv *env, jclass,
154+
jlong nativeCamera, jint eyeId, jdoubleArray model_) {
155+
Camera* camera = (Camera *) nativeCamera;
156+
jdouble *model = env->GetDoubleArrayElements(model_, NULL);
157+
camera->setEyeModelMatrix((uint8_t)eyeId, *reinterpret_cast<const filament::math::mat4*>(model));
158+
env->ReleaseDoubleArrayElements(model_, model, JNI_ABORT);
159+
}
160+
118161
extern "C" JNIEXPORT void JNICALL
119162
Java_com_google_android_filament_Camera_nGetProjectionMatrix(JNIEnv *env, jclass,
120163
jlong nativeCamera, jdoubleArray out_) {
@@ -280,3 +323,5 @@ Java_com_google_android_filament_Camera_nComputeEffectiveFov(JNIEnv*, jclass,
280323
jdouble fovInDegrees, jdouble focusDistance) {
281324
return Camera::computeEffectiveFov(fovInDegrees, focusDistance);
282325
}
326+
327+

android/filament-android/src/main/cpp/Material.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ Java_com_google_android_filament_Material_nGetBlendingMode(JNIEnv*, jclass,
9696
return (jint) material->getBlendingMode();
9797
}
9898

99+
extern "C"
100+
JNIEXPORT jint JNICALL
101+
Java_com_google_android_filament_Material_nGetTransparencyMode(JNIEnv*, jclass,
102+
jlong nativeMaterial) {
103+
Material* material = (Material*) nativeMaterial;
104+
return (jint) material->getTransparencyMode();
105+
}
106+
99107

100108
extern "C"
101109
JNIEXPORT jint JNICALL

android/filament-android/src/main/cpp/MaterialInstance.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,3 +564,19 @@ Java_com_google_android_filament_MaterialInstance_nGetDepthFunc(JNIEnv* env, jcl
564564
MaterialInstance* instance = (MaterialInstance*)nativeMaterialInstance;
565565
return (jint)instance->getDepthFunc();
566566
}
567+
568+
extern "C"
569+
JNIEXPORT void JNICALL
570+
Java_com_google_android_filament_MaterialInstance_nSetTransparencyMode(JNIEnv*, jclass,
571+
jlong nativeMaterialInstance, jint mode) {
572+
MaterialInstance* instance = (MaterialInstance*) nativeMaterialInstance;
573+
instance->setTransparencyMode((MaterialInstance::TransparencyMode) mode);
574+
}
575+
576+
extern "C"
577+
JNIEXPORT jint JNICALL
578+
Java_com_google_android_filament_MaterialInstance_nGetTransparencyMode(JNIEnv*, jclass,
579+
jlong nativeMaterialInstance) {
580+
MaterialInstance* instance = (MaterialInstance*) nativeMaterialInstance;
581+
return (jint) instance->getTransparencyMode();
582+
}

android/filament-android/src/main/cpp/RenderableManager.cpp

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,20 +366,41 @@ Java_com_google_android_filament_RenderableManager_nSetPriority(JNIEnv*, jclass,
366366
rm->setPriority((RenderableManager::Instance) i, (uint8_t) priority);
367367
}
368368

369+
extern "C" JNIEXPORT jint JNICALL
370+
Java_com_google_android_filament_RenderableManager_nGetPriority(JNIEnv*, jclass,
371+
jlong nativeRenderableManager, jint i) {
372+
RenderableManager *rm = (RenderableManager *) nativeRenderableManager;
373+
return (jint) rm->getPriority((RenderableManager::Instance) i);
374+
}
375+
369376
extern "C" JNIEXPORT void JNICALL
370377
Java_com_google_android_filament_RenderableManager_nSetChannel(JNIEnv*, jclass,
371378
jlong nativeRenderableManager, jint i, jint channel) {
372379
RenderableManager *rm = (RenderableManager *) nativeRenderableManager;
373380
rm->setChannel((RenderableManager::Instance) i, (uint8_t) channel);
374381
}
375382

383+
extern "C" JNIEXPORT jint JNICALL
384+
Java_com_google_android_filament_RenderableManager_nGetChannel(JNIEnv*, jclass,
385+
jlong nativeRenderableManager, jint i) {
386+
RenderableManager *rm = (RenderableManager *) nativeRenderableManager;
387+
return (jint) rm->getChannel((RenderableManager::Instance) i);
388+
}
389+
376390
extern "C" JNIEXPORT void JNICALL
377391
Java_com_google_android_filament_RenderableManager_nSetCulling(JNIEnv*, jclass,
378392
jlong nativeRenderableManager, jint i, jboolean enabled) {
379393
RenderableManager *rm = (RenderableManager *) nativeRenderableManager;
380394
rm->setCulling((RenderableManager::Instance) i, enabled);
381395
}
382396

397+
extern "C" JNIEXPORT jboolean JNICALL
398+
Java_com_google_android_filament_RenderableManager_nIsCullingEnabled(JNIEnv*, jclass,
399+
jlong nativeRenderableManager, jint i) {
400+
RenderableManager *rm = (RenderableManager *) nativeRenderableManager;
401+
return (jboolean) rm->isCullingEnabled((RenderableManager::Instance) i);
402+
}
403+
383404
extern "C" JNIEXPORT void JNICALL
384405
Java_com_google_android_filament_RenderableManager_nSetFogEnabled(JNIEnv*, jclass,
385406
jlong nativeRenderableManager, jint i, jboolean enabled) {
@@ -429,6 +450,13 @@ Java_com_google_android_filament_RenderableManager_nIsShadowReceiver(JNIEnv*, jc
429450
return (jboolean) rm->isShadowReceiver((RenderableManager::Instance) i);
430451
}
431452

453+
extern "C" JNIEXPORT jboolean JNICALL
454+
Java_com_google_android_filament_RenderableManager_nIsScreenSpaceContactShadowsEnabled(JNIEnv*, jclass,
455+
jlong nativeRenderableManager, jint i) {
456+
RenderableManager *rm = (RenderableManager *) nativeRenderableManager;
457+
return (jboolean) rm->isScreenSpaceContactShadowsEnabled((RenderableManager::Instance) i);
458+
}
459+
432460
extern "C" JNIEXPORT void JNICALL
433461
Java_com_google_android_filament_RenderableManager_nGetAxisAlignedBoundingBox(JNIEnv* env,
434462
jclass, jlong nativeRenderableManager, jint i, jfloatArray center_,
@@ -500,6 +528,13 @@ Java_com_google_android_filament_RenderableManager_nSetBlendOrderAt(JNIEnv*, jcl
500528
(uint16_t) blendOrder);
501529
}
502530

531+
extern "C" JNIEXPORT jint JNICALL
532+
Java_com_google_android_filament_RenderableManager_nGetBlendOrderAt(JNIEnv*, jclass,
533+
jlong nativeRenderableManager, jint i, jint primitiveIndex) {
534+
RenderableManager *rm = (RenderableManager *) nativeRenderableManager;
535+
return (jint) rm->getBlendOrderAt((RenderableManager::Instance) i, (size_t) primitiveIndex);
536+
}
537+
503538
extern "C" JNIEXPORT void JNICALL
504539
Java_com_google_android_filament_RenderableManager_nSetGlobalBlendOrderEnabledAt(JNIEnv*, jclass,
505540
jlong nativeRenderableManager, jint i, jint primitiveIndex, jboolean enabled) {
@@ -508,6 +543,13 @@ Java_com_google_android_filament_RenderableManager_nSetGlobalBlendOrderEnabledAt
508543
(bool) enabled);
509544
}
510545

546+
extern "C" JNIEXPORT jboolean JNICALL
547+
Java_com_google_android_filament_RenderableManager_nIsGlobalBlendOrderEnabledAt(JNIEnv*, jclass,
548+
jlong nativeRenderableManager, jint i, jint primitiveIndex) {
549+
RenderableManager *rm = (RenderableManager *) nativeRenderableManager;
550+
return (jboolean) rm->isGlobalBlendOrderEnabledAt((RenderableManager::Instance) i, (size_t) primitiveIndex);
551+
}
552+
511553
extern "C" JNIEXPORT jint JNICALL
512554
Java_com_google_android_filament_RenderableManager_nGetEnabledAttributesAt(JNIEnv*, jclass,
513555
jlong nativeRenderableManager, jint i, jint primitiveIndex) {

android/filament-android/src/main/cpp/Texture.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,13 @@ Java_com_google_android_filament_Texture_nBuilderSwizzle(JNIEnv *, jclass ,
173173
(Texture::Swizzle)r, (Texture::Swizzle)g, (Texture::Swizzle)b, (Texture::Swizzle)a);
174174
}
175175

176+
extern "C" JNIEXPORT void JNICALL
177+
Java_com_google_android_filament_Texture_nBuilderSamples(JNIEnv*, jclass,
178+
jlong nativeBuilder, jint samples) {
179+
Texture::Builder *builder = (Texture::Builder *) nativeBuilder;
180+
builder->samples((uint8_t) samples);
181+
}
182+
176183
extern "C"
177184
JNIEXPORT void JNICALL
178185
Java_com_google_android_filament_Texture_nBuilderImportTexture(JNIEnv*, jclass, jlong nativeBuilder, jlong id) {

0 commit comments

Comments
 (0)