TimelineImprovements
This commit is contained in:
1 parent
e312131725
commit
f927552adc
2211 files changed
+115416
-540944
No files matched your search
@@ -636,15 +636,23 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Refraction
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#if defined(MK_URP) || defined(MK_LWRP)
|
||||
#if defined(MK_URP) && UNITY_VERSION >= 60070000
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareOpaqueTexture.hlsl"
|
||||
#elif defined(MK_URP) || defined(MK_LWRP)
|
||||
UNIFORM_TEXTURE_2D_AUTO(_CameraOpaqueTexture)
|
||||
#else
|
||||
UNIFORM_TEXTURE_2D_AUTO(_MKToonRefraction)
|
||||
#endif
|
||||
|
||||
inline half3 SampleRefraction(float2 uv)
|
||||
inline MK_LIGHT_ACCUM3 SampleRefraction(float2 uv)
|
||||
{
|
||||
#if defined(MK_URP) || defined(MK_LWRP)
|
||||
#if defined(MK_URP) && UNITY_VERSION >= 60070000
|
||||
#ifdef MK_LIT
|
||||
return MK_LIGHT_ACCUM3(SampleSceneColor(uv)) * GetInvPreExposureMultiplier();
|
||||
#else
|
||||
return SampleSceneColor(uv);
|
||||
#endif
|
||||
#elif defined(MK_URP) || defined(MK_LWRP)
|
||||
return SampleTex2DAuto(PASS_TEXTURE_2D(_CameraOpaqueTexture, SAMPLER_CLAMPED_MAIN), uv).rgb;
|
||||
#else
|
||||
return SampleTex2DAuto(PASS_TEXTURE_2D(_MKToonRefraction, SAMPLER_CLAMPED_MAIN), uv).rgb;
|
||||
@@ -654,11 +662,23 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Depth
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
UNIFORM_SAMPLER_AND_TEXTURE_2D_AUTO_HP(_CameraDepthTexture)
|
||||
#if defined(MK_URP) && UNITY_VERSION >= 60070000
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareDepthTexture.hlsl"
|
||||
#else
|
||||
UNIFORM_SAMPLER_AND_TEXTURE_2D_AUTO_HP(_CameraDepthTexture)
|
||||
#endif
|
||||
|
||||
inline float SampleDepth(float2 uv)
|
||||
{
|
||||
return SampleTex2DAutoHP(PASS_TEXTURE_2D(_CameraDepthTexture, SAMPLER_CLAMPED_MAIN), uv).r;
|
||||
#if defined(MK_URP) && UNITY_VERSION >= 70000000 && defined(_DEPTH_AS_INPUT_ATTACHMENT)
|
||||
return FetchSceneDepth(uv * _ScreenSize.xy);
|
||||
#elif defined(MK_URP) && UNITY_VERSION >= 70000000 && defined(_DEPTH_AS_INPUT_ATTACHMENT_MSAA)
|
||||
return FetchSceneDepth(uv * _ScreenSize.xy, 0);
|
||||
#elif defined(MK_URP) && UNITY_VERSION >= 60070000
|
||||
return SampleSceneDepth(uv);
|
||||
#else
|
||||
return SampleTex2DAutoHP(PASS_TEXTURE_2D(_CameraDepthTexture, SAMPLER_CLAMPED_MAIN), uv).r;
|
||||
#endif
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in new issue
Block a user