Closed mbalajee closed 2 weeks ago
I think this is a known problem of the previous fix.
I think this is a known problem of the previous fix.
I see, haven't seen any mention of this being a known issue in the PR description or anywhere in the code. I was also suggested to make some changes in Asset/Resource loader to make use of the desktop fix in Android so I thought this must be a bug
Also would it make sense to use JITSHADER in Android ?
You mentioned that it's not fixed for you even with #7917?
I just tried your asset (walls.glb
) on a macbook, and it looks fine (but did not look fine before the commit). How are you checking the result:
git log
to check the latest commit)? Here's some notes of what I did
I added the following to samples/gltf_viewer.cpp
diff --git a/samples/gltf_viewer.cpp b/samples/gltf_viewer.cpp
index 6b83316f1..4472cf948 100644
--- a/samples/gltf_viewer.cpp
+++ b/samples/gltf_viewer.cpp
@@ -747,7 +747,10 @@ int main(int argc, char** argv) {
createJitShaderProvider(engine, OPTIMIZE_MATERIALS) :
createUbershaderProvider(engine, UBERARCHIVE_DEFAULT_DATA, UBERARCHIVE_DEFAULT_SIZE);
- app.assetLoader = AssetLoader::create({engine, app.materials, app.names });
+ AssetConfigurationExtended ext {""};
+ AssetConfiguration config = {engine, app.materials, app.names };
+ config.ext = &ext;
+ app.assetLoader = AssetLoader::create(config);
app.mainCamera = &view->getCamera();
if (filename.isEmpty()) {
app.asset = app.assetLoader->createAsset(
I ran it with
./out/cmake-debug/samples/gltf_viewer -u walls.glb
The result is
Clean build worked. Also I modified AssetConfigurationExtended::isSupported()
to allow Android and it works on Android too (model appears as expected)
Describe the bug Fix for proper normal generation does not work for UBSERSHADER. This suggestion works for JITSHADER (default in gltf_viewer.cpp sample) but it doesn't work for UBERSHADER. Reason I want this to work for ubsershader is because we want to apply the fix for Android which only has
Ubershader.java
. Currently the fix is supported only for desktop app.Would the possible fix for Android be creating an equivalent
Jitshader.java
? Not sure why android only has ubershader & the benefits of one over the other. Any help to have the fix for proper normal generation in Android would be helpful. I tried to apply the fix for Android but not workingTo Reproduce Steps to reproduce the behavior: Run the sample
gltf_viewer.cpp
app with this suggested changeExpected behavior Model should appear normally with UBERSHADER
Screenshots Actual behavior - Model appears all black with UBSERSHADER
Logs Model: walls.glb.zip
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context