Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Wireframe shader causes error on Android player build #189

Closed
FejZa opened this issue May 15, 2019 · 12 comments
Closed

Wireframe shader causes error on Android player build #189

FejZa opened this issue May 15, 2019 · 12 comments
Labels
Bug Something isn't working

Comments

@FejZa
Copy link
Contributor

FejZa commented May 15, 2019

XRTK - Mixed Reality Toolkit Bug Report

Describe the bug

When targeting the Android platform and XR Setting is enabled building the Player will fail because of the Mixed Reality Toolkit/Wireframe shader.

Shader error in 'Mixed Reality Toolkit/Wireframe': unrecognized identifier 'DEFAULT_UNITY_VERTEX_OUTPUT_STEREO_EYE_INDEX' at line 47 (on gles3)

Compiling Vertex program with STEREO_MULTIVIEW_ON
Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_MOBILE UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_LIGHTMAP_DLDR_ENCODING

To Reproduce

  • Create Unity Project
  • Import XRTK
  • Switch to Android platform
  • Build

Expected behavior

The Android Player can be built.

Actual behavior

Build Fails.

Your Setup (please complete the following information)

  • Unity 2019.1.2f1
  • XRTK development branch

Target Platform (please complete the following information)

  • Android
@FejZa FejZa added the Bug Something isn't working label May 15, 2019
@FejZa
Copy link
Contributor Author

FejZa commented May 15, 2019

Happens only if target is Android and XR Settings enabled

@StephenHodgson
Copy link
Contributor

Strange cause this is pretty much lifted from Unity's built in wire frame shader (which I thought was cross platform)

@FejZa
Copy link
Contributor Author

FejZa commented May 18, 2019

Ah forgot About this one. I wasn't able to reproduce it anymore. Probably some hickups Unity had. Closing it.

@FejZa FejZa closed this as completed May 18, 2019
@SimonDarksideJ SimonDarksideJ reopened this Jun 5, 2019
@SimonDarksideJ
Copy link
Contributor

The issue is real (unlike the cake which is a lie)
Shader needs updating or exclusions adding for Android. Currently, have to remove the shader to run on Android

@SimonDarksideJ
Copy link
Contributor

I did see Cameron did some updates to the Standard shader to include Wireframe support. Maybe we could do a refresh from the MRTK for the standard shader and deprecate this one.

According to Ronald at MR dev summit, it's because there is a property that Unity does not expose for the Android platform and it's a known issue.

@FejZa
Copy link
Contributor Author

FejZa commented Jul 10, 2019

We should take a look at the updated shaders. Now that XRTK almost has Oculus Quest support it's important people are able to build to Android without having to delete a shader.

@SimonDarksideJ
Copy link
Contributor

Quest Support is now live in Dev, so we really should look for a way to resolve this issue.
Either by fixing this shader or updating to the latest MRTK standard shader (which now has wireframe support)

One snag is that (apparently) the Quest does not have geom fragment shader support, which is needed? for wireframe.

Supposedly this version of the MRTK standard shader does work?
https://github.com/microsoft/MixedRealityToolkit-Unity/pull/4993/files/493ddac1a19a15c20795016a8f7a361ff1dc72a6#diff-55fa8fd379bc8ffc69911bd63bbc37a3

@StephenHodgson
Copy link
Contributor

Fix the shader

@SimonDarksideJ
Copy link
Contributor

I will look to porting the updated MRTK standard shader which supposedly has wireframe support then we can remove the non-functioning one

@StephenHodgson
Copy link
Contributor

The latest code is pretty much the port from mrtk

@SimonDarksideJ
Copy link
Contributor

Will double-check, if so we only need test that the wireframe logic is working. Will pull up a test scene

@SimonDarksideJ
Copy link
Contributor

Resolved Build issue through PR #254. This resolves the build issue, however, the shader causes the screen to go black on Android, likely due to incompatibility.

SimonDarksideJ added a commit that referenced this issue Jul 30, 2019
* Update Wireframe Shader to new MRTK standard
Resolves #189

* Reverted Property names back to original names

* Updated shader based on comments, removed superfluous white spaces
XRTK-Build-Bot pushed a commit that referenced this issue Aug 8, 2019
* Update Wireframe Shader to new MRTK standard
Resolves #189

* Reverted Property names back to original names

* Updated shader based on comments, removed superfluous white spaces
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants