Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by mintman · Jun 18, 2015 at 07:10 PM · shaderiosbuildmobileglsl

Shader Fails to Compile on iOS: GL_EXT_frag_depth

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.

Comment
Add comment · Show 5
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image BAnyBudde · Jun 27, 2016 at 10:23 AM 0
Share

@$$anonymous$$tman

Did you ever figure this out? I have the same problem, all my games just stopped working one day. They were all working fine the previous day, and now when I do new builds I get the same error.

avatar image BAnyBudde · Jun 27, 2016 at 01:48 PM 0
Share

I am curious if you ever figured out how to fix this. All of my games were on my device working, and now they just stopped working out of the blue a day after I had played them.

When I do a new build, I get the same error as you showed.

This is obviously not an answer, and I did try post it as a reply.

avatar image corriedotdev · Aug 21, 2016 at 03:49 PM 0
Share

@BAnyBuddle Im on this error just now. Same situation as you. Any fixes?

avatar image naveen_pambi · Nov 02, 2016 at 06:13 AM 0
Share

I face the same issue in Unity5.4.2 p2, any fixes?

avatar image arc0de · Dec 22, 2016 at 10:07 AM 0
Share

Same here, i changed nothing on shaders and this error happens only on my iPhone 4S iOS Version 9.3.5 I've tested it on iPad iOS 10 and it works perfectly.

Did you find a solution?

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Snow scene is a neon blue in an iOS build, but looks normal on the computer 1 Answer

iOS Custom Specular Shader 2 Answers

How to create a mirror reflection for mobile devices 1 Answer

How to get IOS build to not fail with Shader Errors? FXAA (Hidden Shader related) 0 Answers

Different Shader Display on 3gs vs. 4s 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges