浏览代码

(wip) distortion

/stochastic_alpha_test
Frédéric Vauchelles 7 年前
当前提交
e2200ec7
共有 3 个文件被更改,包括 10 次插入10 次删除
  1. 12
      SampleScenes/HDTest/GraphicTest/Common/CustomTexture/Mat_DistortionMap_2DNoise.mat
  2. 4
      SampleScenes/HDTest/GraphicTest/Common/CustomTexture/Mat_DistortionMap_Ripple.mat
  3. 4
      ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/ApplyDistorsion.compute

12
SampleScenes/HDTest/GraphicTest/Common/CustomTexture/Mat_DistortionMap_2DNoise.mat


- _Anisotropy: 0
- _BlendMode: 0
- _BlurAmplitude: 1
- _BlurMaxAmplitude: 0
- _BlurMinAmplitude: 0.088
- _BlurMaxAmplitude: 0.405
- _BlurMinAmplitude: 0
- _CoatCoverage: 1
- _CoatIOR: 0.5
- _CullMode: 2

- _DetailSmoothnessScale: 1
- _DistorsionAmplitude: 116.5
- _DistortionAmplitude: 50
- _DistortionAmplitude: 48.2
- _DistortionDepthTest: 0
- _DistortionEnable: 0
- _DistortionOnly: 0

- _InitialBend: 1
- _MaterialID: 1
- _Metallic: 0
- _NoiseAmplitude: 0.492
- _NoiseLacunarity: 9.02
- _NoiseAmplitude: 0.766
- _NoiseLacunarity: 2.18
- _NormalMapSpace: 0
- _NormalScale: 1
- _PPDLodThreshold: 5

- _RefractionMode: 0
- _ShiverDirectionality: 0.5
- _ShiverDrag: 0.2
- _Size: 6.67
- _Size: 4.86
- _Smoothness: 1
- _SmoothnessRemapMax: 1
- _SmoothnessRemapMin: 0

4
SampleScenes/HDTest/GraphicTest/Common/CustomTexture/Mat_DistortionMap_Ripple.mat


- _DetailNormalScale: 1
- _DetailSmoothnessScale: 1
- _DistorsionAmplitude: 52
- _DistortionAmplitude: 28.5
- _DistortionAmplitude: 15.9
- _DistortionDepthTest: 0
- _DistortionEnable: 0
- _DistortionOnly: 0

- _RefractionMode: 0
- _ShiverDirectionality: 0.5
- _ShiverDrag: 0.2
- _Size: 41
- _Size: 56.4
- _Smoothness: 1
- _SmoothnessRemapMax: 1
- _SmoothnessRemapMin: 0

4
ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/ApplyDistorsion.compute


DecodeDistortion(encodedDistorsion, distorsion, distorsionBlur);
float2 distordedUV = (float2(dispatchThreadId) + distorsion) * _Size.zw;
float mip = (_GaussianPyramidColorMipSize.w - 1) * clamp(distorsionBlur.x, 0.0, 1.0);
float mip = (_GaussianPyramidColorMipSize.z - 1) * clamp(distorsionBlur.x, 0.0, 1.0);
float4 sampled = _GaussianPyramidColorTexture.SampleLevel(sampler_GaussianPyramidColorTexture, distordedUV, mip);
float2 uv = float2(dispatchThreadId) * _Size.zw;

if (depth < distordedDepth)
//if (depth < distordedDepth)
_CameraColorTexture[dispatchThreadId] = sampled;
}
正在加载...
取消
保存