浏览代码

fix reflection probe shader on iOS

/main
Filip Iliescu 8 年前
当前提交
9d37e3d7
共有 1 个文件被更改,包括 10 次插入4 次删除
  1. 14
      Assets/ScriptableRenderPipeline/MobileRenderPipeline/ClassicDeferred/Internal-DeferredReflections.shader

14
Assets/ScriptableRenderPipeline/MobileRenderPipeline/ClassicDeferred/Internal-DeferredReflections.shader


#ifdef UNITY_FRAMEBUFFER_FETCH_AVAILABLE
void frag (unity_v2f_deferred i,
in half4 outGBuffer0 : SV_Target0,
in half4 outGBuffer1 : SV_Target1,
in half4 outGBuffer2 : SV_Target2,
in half4 gbuffer0 : SV_Target0,
in half4 gbuffer1 : SV_Target1,
in half4 gbuffer2 : SV_Target2,
out half4 outEmission : SV_Target3,
in float outLinearDepth : SV_Target4)
#else

half3 distance = distanceFromAABB(worldPos, unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz);
half falloff = saturate(1.0 - length(distance)/blendDistance);
half4 ret = half4(rgb*falloff, 1-falloff);
return half4(rgb*falloff, 1-falloff);
#ifdef UNITY_FRAMEBUFFER_FETCH_AVAILABLE
outEmission = ret;
#else
return ret;
#endif
}
ENDCG

正在加载...
取消
保存