浏览代码

Prototype for distorstion

/stochastic_alpha_test
Frédéric Vauchelles 7 年前
当前提交
448737fc
共有 27 个文件被更改,包括 2127 次插入9 次删除
  1. 1
      ScriptableRenderPipeline/HDRenderPipeline/Editor/HDAssetFactory.cs
  2. 37
      ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs
  3. 3
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.shader
  4. 5
      ScriptableRenderPipeline/HDRenderPipeline/Material/Unlit/Editor/BaseUnlitUI.cs
  5. 1
      ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/HDRenderPipelineResources.asset
  6. 2
      ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/HDRenderPipelineResources.asset.meta
  7. 11
      ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/RenderPipelineResources.cs
  8. 1001
      SampleScenes/HDTest/DistortionTest.unity
  9. 8
      SampleScenes/HDTest/DistortionTest.unity.meta
  10. 10
      SampleScenes/HDTest/GraphicTest/Common/CustomTexture.meta
  11. 165
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_Distorsion_2DNoise.mat
  12. 10
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_Distorsion_2DNoise.mat.meta
  13. 164
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_Distorsion_Ripple.mat
  14. 10
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_Distorsion_Ripple.mat.meta
  15. 36
      ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/ApplyDistorsion.compute
  16. 10
      ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/ApplyDistorsion.compute.meta
  17. 158
      SampleScenes/HDTest/GraphicTest/Common/CustomTexture/DistortionMap.shader
  18. 10
      SampleScenes/HDTest/GraphicTest/Common/CustomTexture/DistortionMap.shader.meta
  19. 48
      SampleScenes/HDTest/GraphicTest/Common/CustomTexture/DistortionMap_2DNoise.asset
  20. 10
      SampleScenes/HDTest/GraphicTest/Common/CustomTexture/DistortionMap_2DNoise.asset.meta
  21. 48
      SampleScenes/HDTest/GraphicTest/Common/CustomTexture/DistortionMap_Ripple.asset
  22. 10
      SampleScenes/HDTest/GraphicTest/Common/CustomTexture/DistortionMap_Ripple.asset.meta
  23. 179
      SampleScenes/HDTest/GraphicTest/Common/CustomTexture/Mat_DistortionMap_2DNoise.mat
  24. 10
      SampleScenes/HDTest/GraphicTest/Common/CustomTexture/Mat_DistortionMap_2DNoise.mat.meta
  25. 179
      SampleScenes/HDTest/GraphicTest/Common/CustomTexture/Mat_DistortionMap_Ripple.mat
  26. 10
      SampleScenes/HDTest/GraphicTest/Common/CustomTexture/Mat_DistortionMap_Ripple.mat.meta

1
ScriptableRenderPipeline/HDRenderPipeline/Editor/HDAssetFactory.cs


instance.gaussianPyramidCS = Load<ComputeShader>(PostProcessingPath + "Shaders/Builtins/GaussianDownsample.compute");
instance.depthPyramidCS = Load<ComputeShader>(HDRenderPipelinePath + "RenderPipelineResources/DepthDownsample.compute");
instance.copyChannelCS = Load<ComputeShader>(CorePath + "Resources/GPUCopy.compute");
instance.applyDistortionCS = Load<ComputeShader>(HDRenderPipelinePath + "RenderPipelineResources/ApplyDistorsion.compute");
instance.clearDispatchIndirectShader = Load<ComputeShader>(HDRenderPipelinePath + "Lighting/TilePass/cleardispatchindirect.compute");
instance.buildDispatchIndirectShader = Load<ComputeShader>(HDRenderPipelinePath + "Lighting/TilePass/builddispatchindirect.compute");

37
ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs


autoGenerateMips = false
};
m_DistortionBuffer = HDShaderIDs._DistortionTexture;
m_DistortionBufferRT = new RenderTargetIdentifier(m_DistortionBuffer);
m_DeferredShadowBuffer = HDShaderIDs._DeferredShadowTexture;
m_DeferredShadowBufferRT = new RenderTargetIdentifier(m_DeferredShadowBuffer);

// Instead we chose to apply distortion at the end after we cumulate distortion vector and desired blurriness. This
RenderDistortion(m_CullResults, camera, renderContext, cmd);
RenderGaussianPyramidColor(camera, cmd);
ApplyDistortion(cmd, m_Asset.renderPipelineResources);
RenderPostProcesses(camera, cmd, postProcessLayer);
}
}

renderContext.DrawRenderers(cull.visibleRenderers, ref drawSettings, filterSettings, stateBlock.Value);
}
void ApplyDistortion(CommandBuffer cmd, RenderPipelineResources resources)
{
using (new ProfilingSample(cmd, "ApplyDistortion"))
{
var size = new Vector4(m_CurrentWidth, m_CurrentHeight, 1f / m_CurrentWidth, 1f / m_CurrentHeight);
uint x, y, z;
resources.applyDistortionCS.GetKernelThreadGroupSizes(resources.applyDistortionKernel, out x, out y, out z);
cmd.SetComputeTextureParam(resources.applyDistortionCS, resources.applyDistortionKernel, HDShaderIDs._DistortionTexture, m_DistortionBufferRT);
cmd.SetComputeTextureParam(resources.applyDistortionCS, resources.applyDistortionKernel, HDShaderIDs._GaussianPyramidColorTexture, m_GaussianPyramidColorBufferRT);
cmd.SetComputeTextureParam(resources.applyDistortionCS, resources.applyDistortionKernel, HDShaderIDs._DepthPyramidTexture, m_DepthPyramidBufferRT);
cmd.SetComputeTextureParam(resources.applyDistortionCS, resources.applyDistortionKernel, HDShaderIDs._CameraColorTexture, m_CameraColorBufferRT);
cmd.SetComputeVectorParam(resources.applyDistortionCS, HDShaderIDs._Size, size);
cmd.SetComputeVectorParam(resources.applyDistortionCS, HDShaderIDs._ZBufferParams, Shader.GetGlobalVector(HDShaderIDs._ZBufferParams));
cmd.SetComputeVectorParam(resources.applyDistortionCS, HDShaderIDs._GaussianPyramidColorMipSize, Shader.GetGlobalVector(HDShaderIDs._GaussianPyramidColorMipSize));
cmd.DispatchCompute(resources.applyDistortionCS, resources.applyDistortionKernel, (int)(size.x) / (int)x, (int)(size.y) / (int)y, 1);
}
}
// RenderDepthPrepass render both opaque and opaque alpha tested based on engine configuration.
// Forward only renderer: We always render everything
// Deferred renderer: We render a depth prepass only if engine request it. We can decide if we render everything or only opaque alpha tested object.

{
int w = camera.pixelWidth;
int h = camera.pixelHeight;
int size = Mathf.ClosestPowerOfTwo(Mathf.Min(w, h));
int size = CalculatePyramidSize(w, h);
// The gaussian pyramid compute works in blocks of 8x8 so make sure the last lod has a
// minimum size of 8x8

{
int w = camera.pixelWidth;
int h = camera.pixelHeight;
int size = Mathf.ClosestPowerOfTwo(Mathf.Min(w, h));
int size = CalculatePyramidSize(w, h);
// The gaussian pyramid compute works in blocks of 8x8 so make sure the last lod has a
// minimum size of 8x8

cmd.GetTemporaryRT(m_DistortionBuffer, w, h, 0, FilterMode.Point, Builtin.GetDistortionBufferFormat(), Builtin.GetDistortionBufferReadWrite());
cmd.SetRenderTarget(m_DistortionBufferRT, m_CameraDepthStencilBufferRT);
cmd.ClearRenderTarget(false, true, Color.black); // TODO: can we avoid this clear for performance ?
cmd.ClearRenderTarget(false, true, Color.clear); // TODO: can we avoid this clear for performance ?
// Only transparent object can render distortion vectors
RenderTransparentRenderList(cullResults, camera, renderContext, cmd, HDShaderPassNames.s_DistortionVectorsName);

cmd.GetTemporaryRT(m_CameraFilteringBuffer, w, h, 0, FilterMode.Point, RenderTextureFormat.RGB111110Float, RenderTextureReadWrite.Linear, 1, true); // Enable UAV
// Color and depth pyramids
int s = Mathf.ClosestPowerOfTwo(Mathf.Min(w, h));
int s = CalculatePyramidSize(w, h);
m_GaussianPyramidColorBufferDesc.width = s;
m_GaussianPyramidColorBufferDesc.height = s;
cmd.GetTemporaryRT(m_GaussianPyramidColorBuffer, m_GaussianPyramidColorBufferDesc, FilterMode.Trilinear);

}
// END TEMP
}
}
static int CalculatePyramidSize(int w, int h)
{
return Mathf.ClosestPowerOfTwo(Mathf.Min(w, h));
}
}
}

3
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.shader


Name "Distortion" // Name is not used
Tags { "LightMode" = "DistortionVectors" } // This will be only for transparent object based on the RenderQueue index
Blend One One
Blend One One, One One
BlendOp Add, Max
ZTest [_ZTestMode]
ZWrite off
Cull [_CullMode]

5
ScriptableRenderPipeline/HDRenderPipeline/Material/Unlit/Editor/BaseUnlitUI.cs


public static GUIContent distortionEnableText = new GUIContent("Distortion", "Enable distortion on this shader");
public static GUIContent distortionOnlyText = new GUIContent("Distortion Only", "This shader will only be use to render distortion");
public static GUIContent distortionDepthTestText = new GUIContent("Distortion Depth Test", "Enable the depth test for distortion");
public static GUIContent distortionVectorMapText = new GUIContent("Distortion Vector Map", "Vector Map for the distorsion");
public static string advancedText = "Advanced Options";
}

protected const string kDistortionOnly = "_DistortionOnly";
protected MaterialProperty distortionDepthTest = null;
protected const string kDistortionDepthTest = "_DistortionDepthTest";
protected MaterialProperty distortionVectorMap = null;
protected const string kDistortionVectorMap = "_DistortionVectorMap";
// See comment in LitProperties.hlsl
const string kEmissionColor = "_EmissionColor";

distortionEnable = FindProperty(kDistortionEnable, props, false);
distortionOnly = FindProperty(kDistortionOnly, props, false);
distortionDepthTest = FindProperty(kDistortionDepthTest, props, false);
distortionVectorMap = FindProperty(kDistortionVectorMap, props, false);
}
void SurfaceTypePopup()

if (distortionEnable.floatValue == 1.0f)
{
EditorGUI.indentLevel++;
m_MaterialEditor.TexturePropertySingleLine(StylesBaseUnlit.distortionVectorMapText, distortionVectorMap);
m_MaterialEditor.ShaderProperty(distortionOnly, StylesBaseUnlit.distortionOnlyText);
m_MaterialEditor.ShaderProperty(distortionDepthTest, StylesBaseUnlit.distortionDepthTestText);
EditorGUI.indentLevel--;

1
ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/HDRenderPipelineResources.asset


gaussianPyramidCS: {fileID: 7200000, guid: 6dba4103d23a7904fbc49099355aff3e, type: 3}
depthPyramidCS: {fileID: 7200000, guid: 64a553bb564274041906f78ffba955e4, type: 3}
copyChannelCS: {fileID: 7200000, guid: a68d8aaeb0956234d94e389f196381ee, type: 3}
applyDistortionCS: {fileID: 7200000, guid: 2fa6c0e3fe6dc3145a4156f21913fe5c, type: 3}
clearDispatchIndirectShader: {fileID: 7200000, guid: fc1f553acb80a6446a32d33e403d0656,
type: 3}
buildDispatchIndirectShader: {fileID: 7200000, guid: 4eb1b418be7044c40bb5200496c50f14,

2
ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/HDRenderPipelineResources.asset.meta


fileFormatVersion: 2
guid: 42086e81f4f0c724f96f7f09cc995354
timeCreated: 1507124092
timeCreated: 1507194928
licenseType: Pro
NativeFormatImporter:
externalObjects: {}

11
ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/RenderPipelineResources.cs


public ComputeShader gaussianPyramidCS;
public ComputeShader depthPyramidCS;
public ComputeShader copyChannelCS;
public ComputeShader applyDistortionCS;
// Lighting tile pass resources
public ComputeShader clearDispatchIndirectShader;

public Shader GGXConvolve;
public Shader skyboxCubemap;
public int applyDistortionKernel { get; private set; }
void OnEnable()
{
applyDistortionKernel = -1;
if (applyDistortionCS != null)
applyDistortionKernel = applyDistortionCS.FindKernel("KMain");
}
}
}

1001
SampleScenes/HDTest/DistortionTest.unity
文件差异内容过多而无法显示
查看文件

8
SampleScenes/HDTest/DistortionTest.unity.meta


fileFormatVersion: 2
guid: b2e28eaefe0c2724190bc74e3c9d11c9
timeCreated: 1475076282
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

10
SampleScenes/HDTest/GraphicTest/Common/CustomTexture.meta


fileFormatVersion: 2
guid: edcd9983c0a7e154381e8f596d33e02f
folderAsset: yes
timeCreated: 1507196699
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

165
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_Distorsion_2DNoise.mat


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Mat_Distorsion_2DNoise
m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}
m_ShaderKeywords: _ALBEDOAFFECTEMISSIVE_OFF _ALPHACUTOFFENABLE_OFF _BLENDMODE_LERP
_DEPTHOFFSETENABLE_OFF _DISTORTIONDEPTHTEST_OFF _DISTORTION_ON _DOUBLESIDEDENABLE_OFF
_ENABLEPERPIXELDISPLACEMENT_OFF _ENABLESPECULAROCCLUSION_OFF _ENABLEVERTEXDISPLACEMENT_OFF
_ENABLEWIND_OFF _NORMALMAP_TANGENT_SPACE
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
disabledShaderPasses:
- GBuffer
- META
- SHADOWCASTER
- DepthOnly
- MOTIONVECTORS
- Forward
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AnisotropyMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DistortionVectorMap:
m_Texture: {fileID: 8600000, guid: 99d420ed53cf5bc449b014653d05770d, type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissiveColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _HeightMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecularColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SubsurfaceRadiusMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _ATDistance: 1
- _AlbedoAffectEmissive: 0
- _AlphaCutoff: 0.5
- _AlphaCutoffEnable: 0
- _Anisotropy: 0
- _BlendMode: 0
- _CoatCoverage: 1
- _CoatIOR: 0.5
- _CullMode: 2
- _DepthOffsetEnable: 0
- _DetailAlbedoScale: 1
- _DetailNormalScale: 1
- _DetailSmoothnessScale: 1
- _DistortionDepthTest: 0
- _DistortionEnable: 1
- _DistortionOnly: 1
- _DoubleSidedEnable: 0
- _DoubleSidedNormalMode: 1
- _Drag: 1
- _DstBlend: 10
- _EmissiveColorMode: 1
- _EmissiveIntensity: 0
- _EnablePerPixelDisplacement: 0
- _EnableSpecularOcclusion: 0
- _EnableVertexDisplacement: 0
- _EnableWind: 0
- _HeightAmplitude: 0.01
- _HeightCenter: 0.5
- _HeightMax: 1
- _HeightMin: -1
- _IOR: 1
- _InitialBend: 1
- _MaterialID: 1
- _Metallic: 0
- _NormalMapSpace: 0
- _NormalScale: 1
- _PPDLodThreshold: 5
- _PPDMaxSamples: 15
- _PPDMinSamples: 5
- _PerPixelDisplacementObjectScale: 1
- _RefractionMode: 0
- _ShiverDirectionality: 0.5
- _ShiverDrag: 0.2
- _Smoothness: 1
- _SmoothnessRemapMax: 1
- _SmoothnessRemapMin: 0
- _SrcBlend: 5
- _StencilRef: 2
- _Stiffness: 1
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1
- _SurfaceType: 1
- _TexWorldScale: 1
- _Thickness: 1
- _ThicknessMultiplier: 1
- _UVBase: 0
- _UVDetail: 0
- _VertexDisplacementObjectScale: 1
- _VertexDisplacementTilingScale: 1
- _ZTestMode: 8
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}

10
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_Distorsion_2DNoise.mat.meta


fileFormatVersion: 2
guid: 83ec3bd906ef2d442ad5caa8ecce9d15
timeCreated: 1507195204
licenseType: Pro
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

164
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_Distorsion_Ripple.mat


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Mat_Distorsion_Ripple
m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}
m_ShaderKeywords: _ALBEDOAFFECTEMISSIVE_OFF _ALPHACUTOFFENABLE_OFF _BLENDMODE_LERP
_DEPTHOFFSETENABLE_OFF _DISTORTION_ON _DOUBLESIDEDENABLE_OFF _ENABLEPERPIXELDISPLACEMENT_OFF
_ENABLESPECULAROCCLUSION_OFF _ENABLEVERTEXDISPLACEMENT_OFF _ENABLEWIND_OFF _NORMALMAP_TANGENT_SPACE
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
disabledShaderPasses:
- GBuffer
- META
- SHADOWCASTER
- DepthOnly
- MOTIONVECTORS
- Forward
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AnisotropyMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DistortionVectorMap:
m_Texture: {fileID: 8600000, guid: b47c3f363d01c934e91b198a745925eb, type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissiveColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _HeightMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecularColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SubsurfaceRadiusMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _ATDistance: 1
- _AlbedoAffectEmissive: 0
- _AlphaCutoff: 0.5
- _AlphaCutoffEnable: 0
- _Anisotropy: 0
- _BlendMode: 0
- _CoatCoverage: 1
- _CoatIOR: 0.5
- _CullMode: 2
- _DepthOffsetEnable: 0
- _DetailAlbedoScale: 1
- _DetailNormalScale: 1
- _DetailSmoothnessScale: 1
- _DistortionDepthTest: 1
- _DistortionEnable: 1
- _DistortionOnly: 1
- _DoubleSidedEnable: 0
- _DoubleSidedNormalMode: 1
- _Drag: 1
- _DstBlend: 10
- _EmissiveColorMode: 1
- _EmissiveIntensity: 0
- _EnablePerPixelDisplacement: 0
- _EnableSpecularOcclusion: 0
- _EnableVertexDisplacement: 0
- _EnableWind: 0
- _HeightAmplitude: 0.01
- _HeightCenter: 0.5
- _HeightMax: 1
- _HeightMin: -1
- _IOR: 1
- _InitialBend: 1
- _MaterialID: 1
- _Metallic: 0
- _NormalMapSpace: 0
- _NormalScale: 1
- _PPDLodThreshold: 5
- _PPDMaxSamples: 15
- _PPDMinSamples: 5
- _PerPixelDisplacementObjectScale: 1
- _RefractionMode: 0
- _ShiverDirectionality: 0.5
- _ShiverDrag: 0.2
- _Smoothness: 1
- _SmoothnessRemapMax: 1
- _SmoothnessRemapMin: 0
- _SrcBlend: 5
- _StencilRef: 2
- _Stiffness: 1
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1
- _SurfaceType: 1
- _TexWorldScale: 1
- _Thickness: 1
- _ThicknessMultiplier: 1
- _UVBase: 0
- _UVDetail: 0
- _VertexDisplacementObjectScale: 1
- _VertexDisplacementTilingScale: 1
- _ZTestMode: 4
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}

10
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_Distorsion_Ripple.mat.meta


fileFormatVersion: 2
guid: 12b78618760f1ed418b720ef565ac193
timeCreated: 1507195204
licenseType: Pro
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

36
ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/ApplyDistorsion.compute


#include "../../Core/ShaderLibrary/Common.hlsl"
#include "../Material/Builtin/BuiltinData.hlsl"
Texture2D<float4> _DistortionTexture;
Texture2D<float> _PyramidDepthTexture;
Texture2D<float4> _GaussianPyramidColorTexture;
RWTexture2D<float4> _CameraColorTexture;
SamplerState sampler_GaussianPyramidColorTexture;
SamplerState sampler_PyramidDepthTexture;
CBUFFER_START(cb)
float4 _Size;
float4 _GaussianPyramidColorMipSize;
CBUFFER_END
#pragma kernel KMain
[numthreads(8, 8, 1)]
void KMain(uint2 groupId : SV_GroupID, uint2 groupThreadId : SV_GroupThreadID, uint2 dispatchThreadId : SV_DispatchThreadID)
{
float4 encodedDistorsion = _DistortionTexture.Load(int3(dispatchThreadId, 0));
float2 distorsion;
float2 distorsionBlur;
DecodeDistortion(encodedDistorsion, distorsion, distorsionBlur);
float2 distordedUV = (float2(dispatchThreadId) + distorsion) * _Size.zw;
float mip = (_GaussianPyramidColorMipSize.w - 1) * clamp(distorsionBlur.x, 0.0, 1.0);
float4 sampled = _GaussianPyramidColorTexture.SampleLevel(sampler_GaussianPyramidColorTexture, distordedUV, mip);
float2 uv = float2(dispatchThreadId) * _Size.zw;
float depth = _PyramidDepthTexture.SampleLevel(sampler_PyramidDepthTexture, uv, 0).r;
float distordedDepth = _PyramidDepthTexture.SampleLevel(sampler_PyramidDepthTexture, distordedUV, 0).r;
if (depth < distordedDepth)
_CameraColorTexture[dispatchThreadId] = sampled;
}

10
ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/ApplyDistorsion.compute.meta


fileFormatVersion: 2
guid: 2fa6c0e3fe6dc3145a4156f21913fe5c
timeCreated: 1507194256
licenseType: Pro
ComputeShaderImporter:
externalObjects: {}
currentAPIMask: 4
userData:
assetBundleName:
assetBundleVariant:

158
SampleScenes/HDTest/GraphicTest/Common/CustomTexture/DistortionMap.shader


Shader "Hidden/HDRenderPipeline/Test/DistortionMap"{
Properties
{
_Size("Size", Float) = 1
_DistortionAmplitude("Distortion Amplitude", Float) = 1
_BlurMinAmplitude("Blur Min Amplitude", Range(0, 1)) = 0
_BlurMaxAmplitude("Blur Max Amplitude", Range(0, 1)) = 1
_NoiseAmplitude("Noise Amplitude", Range(0, 1)) = 0.5
_NoiseLacunarity("Noise Lacunarity", Range(0, 10)) = 2
}
CGINCLUDE
const float Pi = 3.14159265359;
float _Size;
float _DistortionAmplitude;
float _BlurMinAmplitude;
float _BlurMaxAmplitude;
float _NoiseAmplitude;
float _NoiseLacunarity;
float rand(float v)
{
return frac(sin(v) * 1634242.2341);
}
float rand(float2 v, float2 o)
{
return rand(dot(v, o));
}
float noise(float2 v, float2 o)
{
float2 p = v;
float2 i = floor(p);
float2 f = frac(v);
float2 u = f*f*(3.0 - 2.0*f);
float f00 = rand(i, o);
float f01 = rand(i + float2(0.0, 1.0), o);
float f11 = rand(i + float2(1.0, 1.0), o);
float f10 = rand(i + float2(1.0, 0.0), o);
return lerp(f00, f10, u.x) +
(f01 - f00)* u.y * (1.0 - u.x) +
(f11 - f10) * u.x * u.y;
}
float3 noise3(float2 v)
{
const float2 _O1 = float2(0.734523, 0.235214);
const float2 _O2 = float2(0.142378, 0.781423);
const float2 _O3 = float2(0.891253, 0.534342);
return float3(noise(v, _O1), noise(v, _O2), noise(v, _O3));
}
float3 fbm(float2 v, float a, float f)
{
float3 r = float3(0.0, 0.0, 0.0);
for (int i = 0; i < 6 ; ++i)
{
r += a * noise3(v);
v *= f;
a *= a;
}
return r;
}
float3 turb(float2 v, float a, float f)
{
float3 r = float3(0.0, 0.0, 0.0);
for (int i = 0; i < 6; ++i)
{
r += a * abs(noise3(v));
v *= f;
a *= a;
}
return r;
}
float3 ridge(float2 v, float a, float f, float3 n)
{
float3 r = float3(0.0, 0.0, 0.0);
for (int i = 0; i < 6; ++i)
{
float3 t = n - abs(a * noise3(v));
t *= t;
r += t;
v *= f;
a *= a;
}
return r;
}
ENDCG
SubShader
{
Lighting Off
Blend One Zero
Pass
{
Name "2DNoise"
CGPROGRAM
#include "UnityCustomRenderTexture.cginc"
#pragma vertex CustomRenderTextureVertexShader
#pragma fragment frag
#pragma target 3.0
float4 frag(v2f_customrendertexture IN) : COLOR
{
float2 p = _Size * IN.globalTexcoord.xy;
float3 s = fbm(p, _NoiseAmplitude, _NoiseLacunarity * (_SinTime.w * 0.1 + 1.0));
float2 distortion = s.xy * _DistortionAmplitude;
float blur = s.z * (_BlurMaxAmplitude - _BlurMinAmplitude) + _BlurMinAmplitude;
return float4(distortion, blur, 1.0);
}
ENDCG
}
Pass
{
Name "Ripple"
CGPROGRAM
#include "UnityCustomRenderTexture.cginc"
#pragma vertex CustomRenderTextureVertexShader
#pragma fragment frag
#pragma target 3.0
float4 frag(v2f_customrendertexture IN) : COLOR
{
float s = _Size * (cos(_Time.w) * 0.1 + 1);
float2 distortion = float2(sin(IN.globalTexcoord.y * s) * _DistortionAmplitude, 0);
float blur = 0;
return float4(distortion, blur, 1.0);
}
ENDCG
}
}
}

10
SampleScenes/HDTest/GraphicTest/Common/CustomTexture/DistortionMap.shader.meta


fileFormatVersion: 2
guid: 6a35625f46490314eb2456e4538d20ec
timeCreated: 1507196742
licenseType: Pro
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

48
SampleScenes/HDTest/GraphicTest/Common/CustomTexture/DistortionMap_2DNoise.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!86 &8600000
CustomRenderTexture:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: DistortionMap_2DNoise
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
m_Width: 1024
m_Height: 1024
m_AntiAliasing: 1
m_DepthFormat: 0
m_ColorFormat: 11
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_BindMS: 0
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 0
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
m_Material: {fileID: 2100000, guid: cfc1d35f7f472e244a98bb5ecfe8ad86, type: 2}
m_InitSource: 1
m_InitMaterial: {fileID: 2100000, guid: cfc1d35f7f472e244a98bb5ecfe8ad86, type: 2}
m_InitColor: {r: 1, g: 0, b: 0, a: 0}
m_InitTexture: {fileID: 2800000, guid: 8abdc3adb95657847a5a8f760fdfc843, type: 3}
m_UpdateMode: 1
m_InitializationMode: 1
m_UpdateZoneSpace: 0
m_CurrentUpdateZoneSpace: 0
m_UpdateZones: []
m_UpdatePeriod: 0
m_ShaderPass: 0
m_CubemapFaceMask: 4294967295
m_DoubleBuffered: 0
m_WrapUpdateZones: 0

10
SampleScenes/HDTest/GraphicTest/Common/CustomTexture/DistortionMap_2DNoise.asset.meta


fileFormatVersion: 2
guid: 99d420ed53cf5bc449b014653d05770d
timeCreated: 1507196714
licenseType: Pro
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 8600000
userData:
assetBundleName:
assetBundleVariant:

48
SampleScenes/HDTest/GraphicTest/Common/CustomTexture/DistortionMap_Ripple.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!86 &8600000
CustomRenderTexture:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: DistortionMap_Ripple
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
m_Width: 1024
m_Height: 1024
m_AntiAliasing: 1
m_DepthFormat: 0
m_ColorFormat: 11
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_BindMS: 0
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 0
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
m_Material: {fileID: 2100000, guid: 8ac64f99a42c6e64ebae3fc8bb262751, type: 2}
m_InitSource: 1
m_InitMaterial: {fileID: 2100000, guid: 8ac64f99a42c6e64ebae3fc8bb262751, type: 2}
m_InitColor: {r: 1, g: 0, b: 0, a: 0}
m_InitTexture: {fileID: 2800000, guid: 8abdc3adb95657847a5a8f760fdfc843, type: 3}
m_UpdateMode: 1
m_InitializationMode: 1
m_UpdateZoneSpace: 0
m_CurrentUpdateZoneSpace: 0
m_UpdateZones: []
m_UpdatePeriod: 0
m_ShaderPass: 1
m_CubemapFaceMask: 4294967295
m_DoubleBuffered: 0
m_WrapUpdateZones: 0

10
SampleScenes/HDTest/GraphicTest/Common/CustomTexture/DistortionMap_Ripple.asset.meta


fileFormatVersion: 2
guid: b47c3f363d01c934e91b198a745925eb
timeCreated: 1507196714
licenseType: Pro
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 8600000
userData:
assetBundleName:
assetBundleVariant:

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


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Mat_DistortionMap_2DNoise
m_Shader: {fileID: 4800000, guid: 6a35625f46490314eb2456e4538d20ec, type: 3}
m_ShaderKeywords: _ALBEDOAFFECTEMISSIVE_OFF _ALPHACUTOFFENABLE_OFF _DEPTHOFFSETENABLE_OFF
_DISTORTIONDEPTHTEST_OFF _DISTORTIONENABLE_OFF _DISTORTIONONLY_OFF _DOUBLESIDEDENABLE_OFF
_ENABLEPERPIXELDISPLACEMENT_OFF _ENABLESPECULAROCCLUSION_OFF _ENABLEVERTEXDISPLACEMENT_OFF
_ENABLEWIND_OFF
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AnisotropyMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DistortionVectorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissiveColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _HeightMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecularColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SubsurfaceRadiusMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Tex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _ATDistance: 1
- _AlbedoAffectEmissive: 0
- _AlphaCutoff: 0.5
- _AlphaCutoffEnable: 0
- _Amplitude: 205.16
- _Anisotropy: 0
- _BlendMode: 0
- _BlurAmplitude: 1
- _BlurMaxAmplitude: 0
- _BlurMinAmplitude: 0.088
- _CoatCoverage: 1
- _CoatIOR: 0.5
- _CullMode: 2
- _DepthOffsetEnable: 0
- _DetailAlbedoScale: 1
- _DetailNormalScale: 1
- _DetailSmoothnessScale: 1
- _DistorsionAmplitude: 116.5
- _DistortionAmplitude: 50
- _DistortionDepthTest: 0
- _DistortionEnable: 0
- _DistortionOnly: 0
- _DoubleSidedEnable: 0
- _DoubleSidedNormalMode: 1
- _Drag: 1
- _DstBlend: 0
- _EmissiveColorMode: 1
- _EmissiveIntensity: 0
- _EnablePerPixelDisplacement: 0
- _EnableSpecularOcclusion: 0
- _EnableVertexDisplacement: 0
- _EnableWind: 0
- _Float: 2.23
- _Glossiness: 0.5
- _HeightAmplitude: 0.01
- _HeightCenter: 0.5
- _HeightMax: 1
- _HeightMin: -1
- _IOR: 1
- _InitialBend: 1
- _MaterialID: 1
- _Metallic: 0
- _NoiseAmplitude: 0.492
- _NoiseLacunarity: 9.02
- _NormalMapSpace: 0
- _NormalScale: 1
- _PPDLodThreshold: 5
- _PPDMaxSamples: 15
- _PPDMinSamples: 5
- _PerPixelDisplacementObjectScale: 1
- _RefractionMode: 0
- _ShiverDirectionality: 0.5
- _ShiverDrag: 0.2
- _Size: 6.67
- _Smoothness: 1
- _SmoothnessRemapMax: 1
- _SmoothnessRemapMin: 0
- _SrcBlend: 1
- _StencilRef: 2
- _Stiffness: 1
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1
- _SurfaceType: 0
- _TexWorldScale: 1
- _Thickness: 1
- _ThicknessMultiplier: 1
- _UVBase: 0
- _UVDetail: 0
- _VertexDisplacementObjectScale: 1
- _VertexDisplacementTilingScale: 1
- _ZTestMode: 8
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.6691177, g: 0.30503896, b: 0.30503896, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
- _RidgeThreshold: {r: 0.2, g: 0.2, b: 0.3, a: 0}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}

10
SampleScenes/HDTest/GraphicTest/Common/CustomTexture/Mat_DistortionMap_2DNoise.mat.meta


fileFormatVersion: 2
guid: cfc1d35f7f472e244a98bb5ecfe8ad86
timeCreated: 1507196726
licenseType: Pro
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

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


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Mat_DistortionMap_Ripple
m_Shader: {fileID: 4800000, guid: 6a35625f46490314eb2456e4538d20ec, type: 3}
m_ShaderKeywords: _ALBEDOAFFECTEMISSIVE_OFF _ALPHACUTOFFENABLE_OFF _DEPTHOFFSETENABLE_OFF
_DISTORTIONDEPTHTEST_OFF _DISTORTIONENABLE_OFF _DISTORTIONONLY_OFF _DOUBLESIDEDENABLE_OFF
_ENABLEPERPIXELDISPLACEMENT_OFF _ENABLESPECULAROCCLUSION_OFF _ENABLEVERTEXDISPLACEMENT_OFF
_ENABLEWIND_OFF
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AnisotropyMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DistortionVectorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissiveColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _HeightMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecularColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SubsurfaceRadiusMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Tex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _ATDistance: 1
- _AlbedoAffectEmissive: 0
- _AlphaCutoff: 0.5
- _AlphaCutoffEnable: 0
- _Amplitude: 205.16
- _Anisotropy: 0
- _BlendMode: 0
- _BlurAmplitude: 1
- _BlurMaxAmplitude: 1
- _BlurMinAmplitude: 0.251
- _CoatCoverage: 1
- _CoatIOR: 0.5
- _CullMode: 2
- _DepthOffsetEnable: 0
- _DetailAlbedoScale: 1
- _DetailNormalScale: 1
- _DetailSmoothnessScale: 1
- _DistorsionAmplitude: 52
- _DistortionAmplitude: 28.5
- _DistortionDepthTest: 0
- _DistortionEnable: 0
- _DistortionOnly: 0
- _DoubleSidedEnable: 0
- _DoubleSidedNormalMode: 1
- _Drag: 1
- _DstBlend: 0
- _EmissiveColorMode: 1
- _EmissiveIntensity: 0
- _EnablePerPixelDisplacement: 0
- _EnableSpecularOcclusion: 0
- _EnableVertexDisplacement: 0
- _EnableWind: 0
- _Float: 2.23
- _Glossiness: 0.5
- _HeightAmplitude: 0.01
- _HeightCenter: 0.5
- _HeightMax: 1
- _HeightMin: -1
- _IOR: 1
- _InitialBend: 1
- _MaterialID: 1
- _Metallic: 0
- _NoiseAmplitude: 0.492
- _NoiseLacunarity: 5.91
- _NormalMapSpace: 0
- _NormalScale: 1
- _PPDLodThreshold: 5
- _PPDMaxSamples: 15
- _PPDMinSamples: 5
- _PerPixelDisplacementObjectScale: 1
- _RefractionMode: 0
- _ShiverDirectionality: 0.5
- _ShiverDrag: 0.2
- _Size: 41
- _Smoothness: 1
- _SmoothnessRemapMax: 1
- _SmoothnessRemapMin: 0
- _SrcBlend: 1
- _StencilRef: 2
- _Stiffness: 1
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1
- _SurfaceType: 0
- _TexWorldScale: 1
- _Thickness: 1
- _ThicknessMultiplier: 1
- _UVBase: 0
- _UVDetail: 0
- _VertexDisplacementObjectScale: 1
- _VertexDisplacementTilingScale: 1
- _ZTestMode: 8
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.6691177, g: 0.30503896, b: 0.30503896, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
- _RidgeThreshold: {r: 0.2, g: 0.2, b: 0.3, a: 0}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}

10
SampleScenes/HDTest/GraphicTest/Common/CustomTexture/Mat_DistortionMap_Ripple.mat.meta


fileFormatVersion: 2
guid: 8ac64f99a42c6e64ebae3fc8bb262751
timeCreated: 1507196726
licenseType: Pro
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存