|
|
@ -4,35 +4,52 @@ Shader "TND/PPV2/sgsr2_2pass_fs" |
|
|
{ |
|
|
{ |
|
|
Cull Off ZWrite Off ZTest Always |
|
|
Cull Off ZWrite Off ZTest Always |
|
|
|
|
|
|
|
|
Pass // Convert |
|
|
|
|
|
|
|
|
Pass |
|
|
{ |
|
|
{ |
|
|
Name "Convert" |
|
|
Name "Convert" |
|
|
|
|
|
|
|
|
HLSLPROGRAM |
|
|
HLSLPROGRAM |
|
|
#pragma vertex VertDefault |
|
|
#pragma vertex VertDefault |
|
|
#pragma fragment sgsr2_convert |
|
|
|
|
|
|
|
|
#pragma fragment FragConvert |
|
|
#pragma target 4.5 |
|
|
#pragma target 4.5 |
|
|
#pragma enable_d3d11_debug_symbols |
|
|
#pragma enable_d3d11_debug_symbols |
|
|
|
|
|
|
|
|
#define UNITY_CG_INCLUDED |
|
|
#define UNITY_CG_INCLUDED |
|
|
#include "Packages/com.unity.postprocessing/PostProcessing/Shaders/StdLib.hlsl" |
|
|
#include "Packages/com.unity.postprocessing/PostProcessing/Shaders/StdLib.hlsl" |
|
|
|
|
|
#undef EPSILON |
|
|
|
|
|
#include "../sgsr2_birp.hlsl" |
|
|
#include "sgsr2_convert.hlsl" |
|
|
#include "sgsr2_convert.hlsl" |
|
|
|
|
|
|
|
|
|
|
|
void FragConvert(VaryingsDefault i, out float4 MotionDepthClipAlphaBuffer: SV_Target) |
|
|
|
|
|
{ |
|
|
|
|
|
sgsr2_convert(i.texcoord, MotionDepthClipAlphaBuffer); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
ENDHLSL |
|
|
ENDHLSL |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Pass // Upscale |
|
|
|
|
|
|
|
|
Pass |
|
|
{ |
|
|
{ |
|
|
Name "Upscale" |
|
|
Name "Upscale" |
|
|
|
|
|
|
|
|
HLSLPROGRAM |
|
|
HLSLPROGRAM |
|
|
#pragma vertex VertDefault |
|
|
#pragma vertex VertDefault |
|
|
#pragma fragment sgsr2_upscale |
|
|
|
|
|
|
|
|
#pragma fragment FragUpscale |
|
|
#pragma target 4.5 |
|
|
#pragma target 4.5 |
|
|
#pragma enable_d3d11_debug_symbols |
|
|
#pragma enable_d3d11_debug_symbols |
|
|
|
|
|
|
|
|
#define UNITY_CG_INCLUDED |
|
|
#define UNITY_CG_INCLUDED |
|
|
#include "Packages/com.unity.postprocessing/PostProcessing/Shaders/StdLib.hlsl" |
|
|
#include "Packages/com.unity.postprocessing/PostProcessing/Shaders/StdLib.hlsl" |
|
|
|
|
|
#undef EPSILON |
|
|
|
|
|
#include "../sgsr2_birp.hlsl" |
|
|
#include "sgsr2_upscale.hlsl" |
|
|
#include "sgsr2_upscale.hlsl" |
|
|
|
|
|
|
|
|
|
|
|
void FragUpscale(VaryingsDefault i, out half4 OutputColor: SV_Target0, out half4 HistoryOutput: SV_Target1) |
|
|
|
|
|
{ |
|
|
|
|
|
sgsr2_upscale(i.texcoord, OutputColor); |
|
|
|
|
|
HistoryOutput = OutputColor; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
ENDHLSL |
|
|
ENDHLSL |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|