Using the Toolkit Dev Branch with Unity 2017.2.1f1 has an issue with the Standard Shader on the ButtonHolographic prefab on Android platform. It does not render the button icon, where the shader is configured as transparent. Furthermore, the usual blue transparent glass front is replaced with just dull blackness. The button does not look very much like the one when using Windows platform.
Button shows the same as under Windows Platform
On Android, the button looks different
Open the dev branch with the mentioned Unity version under Android platform and drag the ButtonHolographic prefab into the scene.
2017.2.1f1
current dev branch
@Cameron-Micka as suggested, I created my issue posted in #2129 here since it still exists
@Cameron-Micka it's actually just a bug in the editor. When built to the device (in my case the Oculus GO), at first glance the button looks as expected.
Taking a peek at this now, just to be sure you are working in the https://github.com/Microsoft/MixedRealityToolkit-Unity/tree/Dev_Working_Branch branch?
@Alexees I was able to reproduce this. To fix this I recommend turning off graphics emulation in the editor (Edit->Graphics Emulation->No Emulation). Or, if you need graphics emulation you can open the Standard shader and remove/comment out these lines:
#if defined(SHADER_API_D3D11)
#pragma target 5.0
#endif
@Cameron-Micka yes, disabling emulation does show the buttons as expected. I'm Using 2018.2.1f1 if that's of interest and it works.
@Cameron-Micka I was also having transparency issues when building for other openGL platforms.
@StephenHodgson Oh really? What version of OpenGL, Core, ES2, etc? And, if you can say what platform and Unity version that would help me reproduce locally.
I was building to WebGL so I'm not sure exactly what it was using haha.
Just switched to the WebGL, built the project, and tried running it in the browser with a demo scene.
Let me try and get you an example repro. A little busy tho, so it could take some time.
Just a quick follow up, I was able to repo this. It is due to me setting the shader model to 5.0 when WebGL doesn't support it and is falling back to vertex lit shader. I'll add a better way to conditionally set the shader model other than assuming the SHADER_API_D3D11 directive is set.
@Cameron-Micka Just confirming that this is also an issue in the beta, correct?
Yep! I need to reach out to Unity about their predefined shader preprocessor macros since I'm seeing some inconsistencies.
@Cameron-Micka anything new about this? I'm cleaning up my own old issues and this is the oldest one.
It's funny you ask, because I made some changes on Friday to address this. Going to give it a little bit more testing locally before I submit a PR.
Most helpful comment
@Cameron-Micka yes, disabling emulation does show the buttons as expected. I'm Using 2018.2.1f1 if that's of interest and it works.