浏览代码

Move check for framebuffer fetch available to main standard shader file since cross compiler appears to be hacked to only enable the macro if its in the main shader file.

/main
Filip Iliescu 8 年前
当前提交
61c47199
共有 3 个文件被更改,包括 18 次插入5 次删除
  1. 8
      Assets/ScriptableRenderPipeline/MobileRenderPipeline/ClassicDeferred/Standard.shader
  2. 9
      Assets/ScriptableRenderPipeline/MobileRenderPipeline/ClassicDeferred/StandardSpecular.shader
  3. 6
      Assets/ScriptableRenderPipeline/MobileRenderPipeline/ClassicDeferred/UnityStandardForwardMobile.cginc

8
Assets/ScriptableRenderPipeline/MobileRenderPipeline/ClassicDeferred/Standard.shader


#include "UnityStandardForwardMobile.cginc"
#ifdef UNITY_FRAMEBUFFER_FETCH_AVAILABLE
half4 fragForward(VertexOutputForwardNew i) : SV_Target3
#else
half4 fragForward(VertexOutputForwardNew i) : SV_Target
#endif
{
return singlePassForward(i);
}
ENDCG
}

9
Assets/ScriptableRenderPipeline/MobileRenderPipeline/ClassicDeferred/StandardSpecular.shader


#include "UnityStandardForwardMobile.cginc"
#ifdef UNITY_FRAMEBUFFER_FETCH_AVAILABLE
half4 fragForward(VertexOutputForwardNew i) : SV_Target3
#else
half4 fragForward(VertexOutputForwardNew i) : SV_Target
#endif
{
return singlePassForward(i);
}
ENDCG
}

6
Assets/ScriptableRenderPipeline/MobileRenderPipeline/ClassicDeferred/UnityStandardForwardMobile.cginc


}
// fragment shader main
#ifdef UNITY_FRAMEBUFFER_FETCH_AVAILABLE
half4 fragForward(VertexOutputForwardNew i) : SV_Target3
#else
half4 fragForward(VertexOutputForwardNew i) : SV_Target
#endif
half4 singlePassForward(VertexOutputForwardNew i)
{
//float linZ = GetLinearZFromSVPosW(i.pos.w); // matching script side where camera space is right handed.
//float3 vP = GetViewPosFromLinDepth(i.pos.xy, linZ);

正在加载...
取消
保存