Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Framebuffer fetch not working on openGL 3.0

Discussion in 'Shaders' started by DanielZeller, Apr 22, 2016.

  1. DanielZeller

    DanielZeller

    Joined:
    Nov 18, 2014
    Posts:
    17
    Hi

    I´m trying to get framebuffer fetch working on iOS. I have a shader that works if i set openGL 2.0 as build target. On OpenGL 3.0 however i get a pink shader with the following log error message: "
    WARNING: Shader Unsupported: 'Custom/FramebufferTest' - Pass '' has no vertex shader
    ". In the editor it works as expected and fallbacks to the expected white color because UNITY_FRAMEBUFFER_FETCH is not available. Any help would be appreciated. Here is the shader:

    Shader "Custom/FramebufferTest"
    {
    SubShader
    {
    Tags { "Queue" = "Overlay" }
    ZWrite Off

    Pass
    {

    CGPROGRAM
    #pragma vertex vert
    #pragma fragment frag
    struct vertexInput
    {
    float4 vertex : POSITION;​
    };

    struct vertexOutput
    {
    float4 pos : SV_POSITION;​
    };

    vertexOutput vert(vertexInput i)
    {
    vertexOutput o;
    o.pos = mul(UNITY_MATRIX_MVP, i.vertex);
    return o;​
    }
    fixed4 frag(vertexOutput i
    #ifdef UNITY_FRAMEBUFFER_FETCH_AVAILABLE
    , inout fixed4 FetchedFrameBufferColor : COLOR0
    #endif
    ) : SV_Target
    {

    fixed4 fragcolor;

    #ifdef UNITY_FRAMEBUFFER_FETCH_AVAILABLE
    fragcolor = FetchedFrameBufferColor * 0.5;​
    #else
    fragcolor = fixed4(1.0, 1.0, 1.0, 1.0);​
    #endif

    return fragcolor;​
    }

    ENDCG
    }​
    }​
    }

    I´m using Unity 5.3.4.f1
     
  2. deadcb

    deadcb

    Joined:
    Jul 18, 2017
    Posts:
    3
  3. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    Please make a bug report.
     
  4. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,589
    Please submit a bug-report as described in this document:
    https://unity3d.com/unity/qa/bug-reporting

    It's important that you report these issues together with a reproduction project if you want them to get fixed. If you don't do it, it might be a long time until someone else reports them or until Unity Technologies find them.

    After you submitted the bug-report, you receive a confirmation email with a bug-report Case number. You can post the Case number (number only, not the link) in this forum thread for Unity staff to pick up, in case they see it.