Search Issue Tracker

Fixed in 2017.1.X

Votes

8

Found in

5.3.5p5

Issue ID

809585

Regression

No

[iOS] Framebuffer Fetch not working with GLES3

iOS

-

Steps to reproduce:
1) Open the attached project.
2) Build for iOS.
3) Deploy to a device via Xcode.
4) Launch the application.

In Xcode console an error message appears:
-------- GLSL link error: ERROR: Input of fragment shader 'vs_COLOR0' not written by vertex shader

This error does not appear with Metal or GLES2.

Comments (4)

  1. crazii

    Nov 24, 2020 09:00

    Same as LUKE-LAMOTHE.
    Unity 2019.4.8F1 (LTS):
    FrameBufferFetch with COLOR0 as vertex input & varying.
    Seems the varying COLOR0 conflicts with FBF's inout COLOR0

  2. Gnappuraz

    Dec 22, 2016 16:40

    Just got this issue writing a very simple shader on a Mac.

    struct vertexOutput {
    float4 pos : SV_POSITION;
    float4 col : COLOR;
    };

    this seems to be the cause of the issue, the COLOR declaration is for some reason causing the GLSL compiler to fail

  3. DanielZeller

    Oct 20, 2016 19:30

    Anyone found a workaround for this?

  4. Luke-Lamothe

    Jul 22, 2016 10:33

    It appears that using COLOR0 when trying to build a GLES3 shader using framebufferfetch will not compile the shader (error given in Editor console log post-build when targeting GLES3):

    Shader error in 'TheShaderName': Duplicated input semantics can't change type, size, or layout ('COLOR'). at line 163 (on gles3)

    Compiling Vertex program
    Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_NO_SCREENSPACE_SHADOWS UNITY_NO_LINEAR_COLORSPACE UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_PBS_USE_BRDF2 SHADER_API_MOBILE

    And if you move your value over to COLOR1, your iOS project will build fine with no errors shown in Unity, but when the shaders are loaded on iOS, you will see:

    Note: Creation of internal variant of shader 'TheShaderName' failed.
    -------- GLSL link error: ERROR: Input of fragment shader 'vs_COLOR0' not written by vertex shader

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.