浏览代码

with renderpasses we are no longer using UVs to look up framebuffer textures, which would have acccounted for a flip in y, so we now need to insert a flip in y based off how unity is treating the render surface. this fixes a flip in projection for deferred shader

/main
Filip Iliescu 7 年前
当前提交
f10d63ca
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 4
      Assets/ScriptableRenderPipeline/MobileRenderPipeline/Shaders/LightingTemplate.hlsl

4
Assets/ScriptableRenderPipeline/MobileRenderPipeline/Shaders/LightingTemplate.hlsl


outWPos = wpos;
}
static float4 debugLighting;
int _LightIndexForShadowMatrixArray;
int _useLegacyCookies;

// corners in camera space when we are drawing a full screen quad.
// Otherwise, when rendering 3D shapes, use the ray calculated here.
if (lightAsQuad){
float2 rayXY = mul(unity_CameraInvProjection, float4(o.pos.x, -o.pos.y, -1, 1)).xy;
float2 rayXY = mul(unity_CameraInvProjection, float4(o.pos.x, _ProjectionParams.x*o.pos.y, -1, 1)).xy;
o.ray = float3(rayXY, 1.0);
}
else

正在加载...
取消
保存