|
|
|
|
|
|
#include "CoreRP/ShaderLibrary/Common.hlsl" |
|
|
|
#include "HDRP/Material/Builtin/BuiltinData.hlsl" |
|
|
|
#include "HDRP/ShaderVariables.hlsl" |
|
|
|
TEXTURE2D(_ColorPyramidTexture); |
|
|
|
RW_TEXTURE2D(float4, _Destination); |
|
|
|
|
|
|
|
SamplerState sampler_ColorPyramidTexture; |
|
|
|
|
|
|
float4 _ColorPyramidScale; |
|
|
|
CBUFFER_END |
|
|
|
|
|
|
|
#pragma kernel KMain |
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
// Get source pixel for distortion |
|
|
|
float2 distordedUV = float2(dispatchThreadId + int2(distortion * _FetchBias)) * _Size.zw; |
|
|
|
float2 distordedUV = float2(dispatchThreadId + int2(distortion * _FetchBias)) * _Size.zw * _ScreenToTargetScale.xy; |
|
|
|
float mip = (_ColorPyramidScale.z - 1) * clamp(distortionBlur, 0.0, 1.0); |
|
|
|
float4 sampled = SAMPLE_TEXTURE2D_LOD(_ColorPyramidTexture, sampler_ColorPyramidTexture, distordedUV, mip); |
|
|
|
|