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