浏览代码

Use a multiply blend mode instead of stencil to control distortion

/stochastic_alpha_test
Frédéric Vauchelles 7 年前
当前提交
acca5c71
共有 20 个文件被更改,包括 2530 次插入87 次删除
  1. 986
      SampleScenes/HDTest/DistortionTest.unity
  2. 9
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_Distorsion_Lit_2DNoise.mat
  3. 13
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_Distorsion_Lit_Only_2DNoise.mat
  4. 19
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_Distorsion_Lit_Only_Ripple.mat
  5. 23
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_Distorsion_Lit_Reject.mat
  6. 16
      ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs
  7. 23
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.shader
  8. 4
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitData.hlsl
  9. 2
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitProperties.hlsl
  10. 52
      ScriptableRenderPipeline/HDRenderPipeline/Material/Unlit/Editor/BaseUnlitUI.cs
  11. 23
      ScriptableRenderPipeline/HDRenderPipeline/Material/Unlit/Unlit.shader
  12. 4
      ScriptableRenderPipeline/HDRenderPipeline/Material/Unlit/UnlitData.hlsl
  13. 2
      ScriptableRenderPipeline/HDRenderPipeline/Material/Unlit/UnlitProperties.hlsl
  14. 22
      ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/ApplyDistorsion.compute
  15. 174
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_Fire.mat
  16. 10
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_Fire.mat.meta
  17. 1001
      SampleScenes/HDTest/GraphicTest/Common/Textures/Fire_6x10.png
  18. 117
      SampleScenes/HDTest/GraphicTest/Common/Textures/Fire_6x10.png.meta
  19. 117
      SampleScenes/HDTest/GraphicTest/Common/Textures/Fire_6x10_alpha.tga.meta

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

9
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_Distorsion_Lit_2DNoise.mat


- _DetailAlbedoScale: 1
- _DetailNormalScale: 1
- _DetailSmoothnessScale: 1
- _DistortionBlendMode: 0
- _DistortionBlendOp: 0
- _DistortionBlurBlendMode: 0
- _DistortionBlurDstBlend: 0
- _DistortionBlurScale: 1
- _DistortionBlurSrcBlend: 0
- _DistortionDstBlend: 1
- _DistortionScale: 1
- _DistortionSrcBlend: 1
- _DistortionStencilRef: 4
- _DoubleSidedEnable: 0
- _DoubleSidedNormalMode: 1

13
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_Distorsion_Lit_Only_2DNoise.mat


- DepthOnly
- MOTIONVECTORS
- Forward
- ForwardOnlyOpaqueDepthOnly
- ForwardOnlyOpaque
- GBufferWithPrepass
- TransparentDepthPrepass
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:

- _DetailAlbedoScale: 1
- _DetailNormalScale: 1
- _DetailSmoothnessScale: 1
- _DistortionBlendMode: 0
- _DistortionBlendOp: 0
- _DistortionBlurBlendMode: 0
- _DistortionBlurDstBlend: 0
- _DistortionBlurScale: 1
- _DistortionBlurSrcBlend: 0
- _DistortionDstBlend: 1
- _DistortionScale: 1
- _DistortionSrcBlend: 1
- _DistortionStencilRef: 4
- _DoubleSidedEnable: 0
- _DoubleSidedNormalMode: 1

19
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_Distorsion_Lit_Only_Ripple.mat


stringTagMap:
RenderType: Transparent
disabledShaderPasses:
- Forward
- DepthOnly
- ForwardOnlyOpaqueDepthOnly
- ForwardOnlyOpaque
- GBufferWithPrepass
- MOTIONVECTORS
- TransparentDepthPrepass
- DepthOnly
- MOTIONVECTORS
- Forward
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:

- _DetailAlbedoScale: 1
- _DetailNormalScale: 1
- _DetailSmoothnessScale: 1
- _DistortionBlendMode: 1
- _DistortionBlendOp: 21
- _DistortionBlurBlendMode: 0
- _DistortionBlurDstBlend: 0
- _DistortionBlurScale: 1
- _DistortionBlurSrcBlend: 8
- _DistortionDstBlend: 0
- _DistortionScale: 0
- _DistortionSrcBlend: 2
- _DistortionStencilRef: 4
- _DoubleSidedEnable: 0
- _DoubleSidedNormalMode: 1

23
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_Distorsion_Lit_Reject.mat


m_Name: Mat_Distorsion_Lit_Reject
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
_DEPTHOFFSETENABLE_OFF _DISTORTIONDEPTHTEST_OFF _DISTORTIONNULLIFY_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

- DepthOnly
- MOTIONVECTORS
- Forward
- ForwardOnlyOpaqueDepthOnly
- ForwardOnlyOpaque
- GBufferWithPrepass
- TransparentDepthPrepass
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:

- _DetailAlbedoScale: 1
- _DetailNormalScale: 1
- _DetailSmoothnessScale: 1
- _DistortionBlendMode: 1
- _DistortionBlendOp: 0
- _DistortionBlurBlendMode: 0
- _DistortionBlurDstBlend: 0
- _DistortionBlurScale: 0
- _DistortionBlurSrcBlend: 0
- _DistortionDstBlend: 0
- _DistortionNullify: 1
- _DistortionNullify: 0
- _DistortionStencilRef: 0
- _DistortionScale: 0
- _DistortionSrcBlend: 2
- _DistortionStencilRef: 4
- _DoubleSidedEnable: 0
- _DoubleSidedNormalMode: 1
- _Drag: 1

16
ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs


Material m_CopyStencilForSplitLighting;
Material m_CopyStencilForRegularLighting;
Material m_CopyStencilForDistortion;
GPUCopy m_GPUCopy;
// Various set of material use in render loop

m_CopyStencilForRegularLighting = CoreUtils.CreateEngineMaterial("Hidden/HDRenderPipeline/CopyStencilBuffer");
m_CopyStencilForRegularLighting.DisableKeyword("EXPORT_HTILE");
m_CopyStencilForRegularLighting.SetInt(HDShaderIDs._StencilRef, (int)StencilLightingUsage.RegularLighting);
m_CopyStencilForDistortion = CoreUtils.CreateEngineMaterial("Hidden/HDRenderPipeline/CopyStencilBuffer");
m_CopyStencilForDistortion.DisableKeyword("EXPORT_HTILE");
m_CopyStencilForDistortion.SetInt(HDShaderIDs._StencilRef, (int)StencilBitMask.DistortionEnabled);
m_CameraMotionVectorsMaterial = CoreUtils.CreateEngineMaterial("Hidden/HDRenderPipeline/CameraMotionVectors");
InitializeDebugMaterials();

// But resolving at each objects that write in distortion is not possible (need to sort transparent, render those that do not distort, then resolve, then etc...)
// Instead we chose to apply distortion at the end after we cumulate distortion vector and desired blurriness.
AccumulateDistortion(m_CullResults, camera, renderContext, cmd);
// We need the stencil buffer to render the distortion in a compute shader
// Due to API limitation, it will OVERRIDE previous values in copied stencil buffer
PrepareAndBindStencilTextureForDistortion(cmd);
RenderDistortion(cmd, m_Asset.renderPipelineResources);
RenderPostProcesses(camera, cmd, postProcessLayer);

}
}
void PrepareAndBindStencilTextureForDistortion(CommandBuffer cmd)
{
// We need to get the 3rd bit of the stencil buffer for distortion
// This call will overwrite the stencil with the value of the third bit (0 or 4)
using (new ProfilingSample(cmd, "Copy StencilBuffer For Distortion"))
CoreUtils.DrawFullScreen(cmd, m_CopyStencilForDistortion, m_CameraStencilBufferCopyRT, m_CameraDepthStencilBufferRT);
}
void RenderDistortion(CommandBuffer cmd, RenderPipelineResources resources)
{
using (new ProfilingSample(cmd, "ApplyDistortion"))

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._CameraColorTexture, m_CameraColorBufferRT);
cmd.SetComputeTextureParam(resources.applyDistortionCS, resources.applyDistortionKernel, HDShaderIDs._StencilTexture, m_CameraStencilBufferCopyRT);
cmd.SetComputeVectorParam(resources.applyDistortionCS, HDShaderIDs._Size, size);
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);

23
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.shader


[ToggleOff] _DistortionOnly("Distortion Only", Float) = 0.0
[ToggleOff] _DistortionDepthTest("Distortion Depth Test Enable", Float) = 0.0
[ToggleOff] _DepthOffsetEnable("Depth Offset View space", Float) = 0.0
[HideInInspector] _DistortionStencilRef("Distortion Stencil Ref", Int) = 4
[ToggleOff] _DistortionNullify("Nullify distortion", Float) = 0.0
[Enum(Add, 0, Multiply, 1)] _DistortionBlendMode("Distortion Blend Mode", Int) = 0
[HideInInspector] _DistortionSrcBlend("Distortion Blend Src", Int) = 0
[HideInInspector] _DistortionDstBlend("Distortion Blend Dst", Int) = 0
[HideInInspector] _DistortionBlurSrcBlend("Distortion Blur Blend Src", Int) = 0
[HideInInspector] _DistortionBlurDstBlend("Distortion Blur Blend Dst", Int) = 0
[HideInInspector] _DistortionBlurBlendMode("Distortion Blur Blend Mode", Int) = 0
_DistortionScale("Distortion Scale", Float) = 1
_DistortionBlurScale("Distortion Blur Scale", Float) = 1
[ToggleOff] _AlphaCutoffEnable("Alpha Cutoff Enable", Float) = 0.0
_AlphaCutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5

Name "Distortion" // Name is not used
Tags { "LightMode" = "DistortionVectors" } // This will be only for transparent object based on the RenderQueue index
Blend One One, One One
BlendOp Add, Max
Blend [_DistortionSrcBlend] [_DistortionDstBlend], [_DistortionBlurSrcBlend] [_DistortionBlurDstBlend]
BlendOp Add, [_DistortionBlurBlendOp]
Stencil
{
Ref [_DistortionStencilRef]
Comp Always
Pass Replace
// This will erase previous stencil information
// Make sure this pass is called after light stencil bits were used
}
HLSLPROGRAM

4
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitData.hlsl


#if (SHADERPASS == SHADERPASS_DISTORTION)
float3 distortion = SAMPLE_TEXTURE2D(_DistortionVectorMap, sampler_DistortionVectorMap, input.texCoord0).rgb;
builtinData.distortion = distortion.rg;
builtinData.distortionBlur = distortion.b;
builtinData.distortion = distortion.rg * _DistortionScale;
builtinData.distortionBlur = clamp(distortion.b * _DistortionBlurScale, 0.0, 1.0);
#else
builtinData.distortion = float2(0.0, 0.0);
builtinData.distortionBlur = 0.0;

2
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitProperties.hlsl


// shared constant between lit and layered lit
float _AlphaCutoff;
float4 _DoubleSidedConstants;
float _DistortionScale;
float _DistortionBlurScale;
float _PPDMaxSamples;
float _PPDMinSamples;

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


using System;
using UnityEngine;
using UnityEngine.Experimental.Rendering.HDPipeline;
using UnityEngine.Rendering;
namespace UnityEditor.Experimental.Rendering.HDPipeline
{

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 GUIContent distortionNullifyText = new GUIContent("Nullify Distortion", "Nullify distortion");
public static GUIContent distortionVectorMapText = new GUIContent("Distortion Vector Map", "Vector Map for the distorsion");
public static GUIContent distortionBlendModeText = new GUIContent("Distortion Blend Mode", "Distortion Blend Mode");
public static GUIContent distortionScaleText = new GUIContent("Distortion Scale", "Distortion Scale");
public static GUIContent distortionBlurScaleText = new GUIContent("Distortion Blur Scale", "Distortion Blur Scale");
public static string advancedText = "Advanced Options";
}

protected const string kDistortionEnable = "_DistortionEnable";
protected MaterialProperty distortionOnly = null;
protected const string kDistortionOnly = "_DistortionOnly";
protected MaterialProperty distortionNullify = null;
protected const string kDistortionNullify = "_DistortionNullify";
protected MaterialProperty distortionBlendMode = null;
protected const string kDistortionBlendMode = "_DistortionBlendMode";
protected MaterialProperty distortionScale = null;
protected const string kDistortionScale = "_DistortionScale";
protected MaterialProperty distortionBlurScale = null;
protected const string kDistortionBlurScale = "_DistortionBlurScale";
// See comment in LitProperties.hlsl
const string kEmissionColor = "_EmissionColor";

distortionOnly = FindProperty(kDistortionOnly, props, false);
distortionDepthTest = FindProperty(kDistortionDepthTest, props, false);
distortionVectorMap = FindProperty(kDistortionVectorMap, props, false);
distortionNullify = FindProperty(kDistortionNullify, props, false);
distortionBlendMode = FindProperty(kDistortionBlendMode, props, false);
distortionScale = FindProperty(kDistortionScale, props, false);
distortionBlurScale = FindProperty(kDistortionBlurScale, props, false);
}
void SurfaceTypePopup()

if (distortionEnable.floatValue == 1.0f)
{
EditorGUI.indentLevel++;
m_MaterialEditor.ShaderProperty(distortionBlendMode, StylesBaseUnlit.distortionBlendModeText);
m_MaterialEditor.ShaderProperty(distortionNullify, StylesBaseUnlit.distortionNullifyText);
m_MaterialEditor.ShaderProperty(distortionScale, StylesBaseUnlit.distortionScaleText);
m_MaterialEditor.ShaderProperty(distortionBlurScale, StylesBaseUnlit.distortionBlurScaleText);
EditorGUI.indentLevel--;
}
}

material.SetInt("_ZTestMode", (int)UnityEngine.Rendering.CompareFunction.Always);
}
bool distortionNullify = material.GetFloat(kDistortionNullify) > 0.0f;
if (distortionNullify)
{
material.SetInt("_DistortionStencilRef", 0);
}
else
var distortionBlendMode = material.GetInt(kDistortionBlendMode);
switch (distortionBlendMode)
material.SetInt("_DistortionStencilRef", (int)HDRenderPipeline.StencilBitMask.DistortionEnabled);
default:
case 0: // Add
{
material.SetInt("_DistortionSrcBlend", (int)UnityEngine.Rendering.BlendMode.One);
material.SetInt("_DistortionDstBlend", (int)UnityEngine.Rendering.BlendMode.One);
material.SetInt("_DistortionBlurSrcBlend", (int)UnityEngine.Rendering.BlendMode.One);
material.SetInt("_DistortionBlurDstBlend", (int)UnityEngine.Rendering.BlendMode.One);
material.SetInt("_DistortionBlurBlendOp", (int)UnityEngine.Rendering.BlendOp.Max);
break;
}
case 1: // Multiply
material.SetInt("_DistortionSrcBlend", (int)UnityEngine.Rendering.BlendMode.DstColor);
material.SetInt("_DistortionDstBlend", (int)UnityEngine.Rendering.BlendMode.Zero);
material.SetInt("_DistortionBlurSrcBlend", (int)UnityEngine.Rendering.BlendMode.DstAlpha);
material.SetInt("_DistortionBlurDstBlend", (int)UnityEngine.Rendering.BlendMode.Zero);
material.SetInt("_DistortionBlurBlendOp", (int)UnityEngine.Rendering.BlendOp.Add);
break;
}
}

23
ScriptableRenderPipeline/HDRenderPipeline/Material/Unlit/Unlit.shader


[ToggleOff] _DistortionEnable("Enable Distortion", Float) = 0.0
[ToggleOff] _DistortionOnly("Distortion Only", Float) = 0.0
[ToggleOff] _DistortionDepthTest("Distortion Depth Test Enable", Float) = 0.0
[HideInInspector] _DistortionStencilRef("Distortion Stencil Ref", Int) = 4
[ToggleOff] _DistortionNullify("Nullify distortion", Float) = 0.0
[Enum(Add, 0, Multiply, 1)] _DistortionBlendMode("Distortion Blend Mode", Int) = 0
[HideInInspector] _DistortionSrcBlend("Distortion Blend Src", Int) = 0
[HideInInspector] _DistortionDstBlend("Distortion Blend Dst", Int) = 0
[HideInInspector] _DistortionBlurSrcBlend("Distortion Blur Blend Src", Int) = 0
[HideInInspector] _DistortionBlurDstBlend("Distortion Blur Blend Dst", Int) = 0
[HideInInspector] _DistortionBlurBlendMode("Distortion Blur Blend Mode", Int) = 0
_DistortionScale("Distortion Scale", Float) = 1
_DistortionBlurScale("Distortion Blur Scale", Float) = 1
[ToggleOff] _AlphaCutoffEnable("Alpha Cutoff Enable", Float) = 0.0
_AlphaCutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5

Name "Distortion" // Name is not used
Tags { "LightMode" = "DistortionVectors" } // This will be only for transparent object based on the RenderQueue index
Blend One One, One One
BlendOp Add, Max
Blend [_DistortionSrcBlend] [_DistortionDstBlend], [_DistortionBlurSrcBlend] [_DistortionBlurDstBlend]
BlendOp Add, [_DistortionBlurBlendOp]
Stencil
{
Ref [_DistortionStencilRef]
Comp Always
Pass Replace
// This will erase previous stencil information
// Make sure this pass is called after light stencil bits were used
}
HLSLPROGRAM

4
ScriptableRenderPipeline/HDRenderPipeline/Material/Unlit/UnlitData.hlsl


#if (SHADERPASS == SHADERPASS_DISTORTION)
float3 distortion = SAMPLE_TEXTURE2D(_DistortionVectorMap, sampler_DistortionVectorMap, input.texCoord0).rgb;
builtinData.distortion = distortion.rg;
builtinData.distortionBlur = distortion.b;
builtinData.distortion = distortion.rg * _DistortionScale;
builtinData.distortionBlur = clamp(distortion.b * _DistortionBlurScale, 0.0, 1.0);
#else
builtinData.distortion = float2(0.0, 0.0);
builtinData.distortionBlur = 0.0;

2
ScriptableRenderPipeline/HDRenderPipeline/Material/Unlit/UnlitProperties.hlsl


float _EmissiveIntensity;
float _AlphaCutoff;
float _DistortionScale;
float _DistortionBlurScale;
// Caution: C# code in BaseLitUI.cs call LightmapEmissionFlagsProperty() which assume that there is an existing "_EmissionColor"
// value that exist to identify if the GI emission need to be enabled.

22
ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/ApplyDistorsion.compute


#include "../../Core/ShaderLibrary/Common.hlsl"
#include "../../Core/ShaderLibrary/Packing.hlsl"
Texture2D<float4> _StencilTexture;
Texture2D<float4> _GaussianPyramidColorTexture;
RWTexture2D<float4> _CameraColorTexture;

[numthreads(8, 8, 1)]
void KMain(uint2 groupId : SV_GroupID, uint2 groupThreadId : SV_GroupThreadID, uint2 dispatchThreadId : SV_DispatchThreadID)
{
// Reject pixels based on stencil buffer
// 3rd bit is 1 for rejected pixels
uint stencil = UnpackByte(_StencilTexture.Load(uint3(dispatchThreadId, 0)).r);
bool isValid = (stencil & DISTORTIONENABLED_STENCILBIT) != 0;
if (!isValid)
return;
// We use a bias when fetching distortion source pixels
// This avoid artifacts when a distortion is overlapped by an opaque object
const float _FetchBias = 0.9;

float4 encodedDistordedDistortion = _DistortionTexture.Load(int3(distortedEncodedDistortionId, 0));
DecodeDistortion(encodedDistordedDistortion, distordedDistortion, distordedDistortionBlur, distordedValidForDistortion);
if (distordedValidForDistortion && validForDistortion)
{
// Get source pixel for distortion
float2 distordedUV = float2(dispatchThreadId + int2(distortion * _FetchBias)) * _Size.zw;
float mip = (_GaussianPyramidColorMipSize.z - 1) * clamp(distortionBlur.x, 0.0, 1.0);
float4 sampled = _GaussianPyramidColorTexture.SampleLevel(sampler_GaussianPyramidColorTexture, distordedUV, mip);
// Get source pixel for distortion
float2 distordedUV = float2(dispatchThreadId + int2(distortion * _FetchBias)) * _Size.zw;
float mip = (_GaussianPyramidColorMipSize.z - 1) * clamp(distortionBlur.x, 0.0, 1.0);
float4 sampled = _GaussianPyramidColorTexture.SampleLevel(sampler_GaussianPyramidColorTexture, distordedUV, mip);
_CameraColorTexture[dispatchThreadId] = sampled;
}
_CameraColorTexture[dispatchThreadId] = sampled;
}

174
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_Fire.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_Fire
m_Shader: {fileID: 4800000, guid: c4edd00ff2db5b24391a4fcb1762e459, type: 3}
m_ShaderKeywords: _ALBEDOAFFECTEMISSIVE_OFF _ALPHACUTOFFENABLE_OFF _BLENDMODE_LERP
_DEPTHOFFSETENABLE_OFF _DISTORTIONDEPTHTEST_OFF _DISTORTIONNULLIFY_OFF _DISTORTIONONLY_OFF
_DOUBLESIDEDENABLE_OFF _ENABLEPERPIXELDISPLACEMENT_OFF _ENABLESPECULAROCCLUSION_OFF
_ENABLEVERTEXDISPLACEMENT_OFF _ENABLEWIND_OFF
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
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}
- _ColorMap:
m_Texture: {fileID: 2800000, guid: e394d1c1e9b289443936483ad0c5ebeb, type: 3}
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: 2800000, guid: ac92c0f4bdc82e84fbd6dc4c7ec78f95, type: 3}
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
- _DistortionBlendMode: 0
- _DistortionBlurBlendMode: 0
- _DistortionBlurDstBlend: 0
- _DistortionBlurScale: 1
- _DistortionBlurSrcBlend: 0
- _DistortionDepthTest: 0
- _DistortionDstBlend: 1
- _DistortionEnable: 1
- _DistortionNullify: 0
- _DistortionOnly: 0
- _DistortionScale: 1
- _DistortionSrcBlend: 1
- _DistortionStencilRef: 4
- _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}
- _Color: {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_Fire.mat.meta


fileFormatVersion: 2
guid: 889e40ad454f5d44da706bce9dc12ef4
timeCreated: 1507639400
licenseType: Pro
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

1001
SampleScenes/HDTest/GraphicTest/Common/Textures/Fire_6x10.png
文件差异内容过多而无法显示
查看文件

117
SampleScenes/HDTest/GraphicTest/Common/Textures/Fire_6x10.png.meta


fileFormatVersion: 2
guid: e394d1c1e9b289443936483ad0c5ebeb
timeCreated: 1507639328
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: tvOS
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: Windows Store Apps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

117
SampleScenes/HDTest/GraphicTest/Common/Textures/Fire_6x10_alpha.tga.meta


fileFormatVersion: 2
guid: ac92c0f4bdc82e84fbd6dc4c7ec78f95
timeCreated: 1507640812
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 0
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: tvOS
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: Windows Store Apps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

部分文件因为文件数量过多而无法显示

正在加载...
取消
保存