Quantcast
Channel: Questions in topic: "build"
Viewing all articles
Browse latest Browse all 4084

Shader Fails to Compile on iOS: GL_EXT_frag_depth

$
0
0
I have a very simple masking shader (three, actually, that work in tandem.) Shader "Custom/CutoutA" { SubShader { Tags { "Queue" = "Geometry-3" } Pass { CGPROGRAM #pragma vertex vert #pragma fragment frag float4 vert(float4 v:POSITION) : SV_POSITION { return mul (UNITY_MATRIX_MVP, v); } void frag(out float depth:DEPTH) { depth = -1; } ENDCG } } } They were working on my iOS device. I switched platforms to a Mac Standalone for a month in order to make a build to show on a tv at an event. I may have also updated from Unity 4.x to Unity 5.x. I can't remember exactly when that happened. Recently, I've switched back to the mobile build. Upon compiling for device, these masking shaders are no longer working. They appear pink, so I - placed the shaders in the Resources/ folder. - added them to the *Included Shaders* section of the Graphics settings. Neither helped. Eventually I noticed that the runtime log (visible through Xcode while running on device) says the following: -------- Shader compilation failed #version 100 #extension GL_EXT_frag_depth : enable void main () { gl_FragDepthEXT = -1.0; } -------- failed compiling: fragment evaluation shader -------- GLSL error: WARNING: 0:4: extension 'GL_EXT_frag_depth' is not supported ERROR: 0:7: Use of undeclared identifier 'gl_FragDepthEXT' Note: Creation of internal variant of shader 'Custom/CutoutA' failed. WARNING: Shader Unsupported: 'Custom/CutoutA' - Setting to default shader. Anyone have any experience with this? I've been able to view the generated shader code and it looks like it's trying to use the GL_EXT_frag_depth extension.

Viewing all articles
Browse latest Browse all 4084

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>