|
|
|
|
|
|
|
|
|
|
#if (SHADERPASS == SHADERPASS_DISTORTION) || defined(DEBUG_DISPLAY) |
|
|
|
float3 distortion = SAMPLE_TEXTURE2D(_DistortionVectorMap, sampler_DistortionVectorMap, input.texCoord0).rgb; |
|
|
|
distortion.rg *= _DistortionVectorScale + _DistortionVectorBias; |
|
|
|
distortion.rg = distortion.rg * _DistortionVectorScale.xx + _DistortionVectorBias.xx; |
|
|
|
builtinData.distortion = distortion.rg * _DistortionScale; |
|
|
|
builtinData.distortionBlur = clamp(distortion.b * _DistortionBlurScale, 0.0, 1.0) * (_DistortionBlurRemapMax - _DistortionBlurRemapMin) + _DistortionBlurRemapMin; |
|
|
|
#else |
|
|
|