Search Issue Tracker

Fixed in 2017.1

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 (3)

  1. C1f7c1b5ea33a97530a9677b88b2a0f3?d=mm

    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

  2. 404f907476c4e2a59f88260c741d7b29?d=mm

    s141797

    Oct 20, 2016 19:30

    Anyone found a workaround for this?

  3. Acd041d412889646dd404c67c24acdce?d=mm

    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.