浏览代码

Added refraction mask

/Yibing-Project-2
Frédéric Vauchelles 7 年前
当前提交
051c4673
共有 28 个文件被更改,包括 1555 次插入41 次删除
  1. 8
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_Distorsion_Lit_Only_Ripple.mat
  2. 3
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thickplane_Clear_ior101.mat
  3. 3
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thickplane_Clear_ior15.mat
  4. 3
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thickplane_Dragon.mat
  5. 3
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thickplane_EarthMap.mat
  6. 3
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thicksphere_Clear_ior101.mat
  7. 3
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thicksphere_Clear_ior15.mat
  8. 3
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thicksphere_Dragon.mat
  9. 3
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thicksphere_EarthMap.mat
  10. 7
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thicksphere_EarthMap_pretransparent.mat
  11. 3
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thinplane_Clear_ior101.mat
  12. 3
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thinplane_Clear_ior15.mat
  13. 3
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thinplane_Dragon.mat
  14. 3
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thinplane_EarthMap.mat
  15. 89
      SampleScenes/HDTest/GraphicTest/Scripts/MaterialPlacer.cs
  16. 5
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.cs
  17. 10
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.cs.hlsl
  18. 9
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl
  19. 3
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitDataInternal.hlsl
  20. 253
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thicksphere_EarthMap_RefractionMask.mat
  21. 8
      SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thicksphere_EarthMap_RefractionMask.mat.meta
  22. 1001
      SampleScenes/HDTest/GraphicTest/Common/Textures/EarthColorandMask.png
  23. 77
      SampleScenes/HDTest/GraphicTest/Common/Textures/EarthColorandMask.png.meta
  24. 10
      SampleScenes/HDTest/GraphicTest/Scripts/Editor.meta
  25. 67
      SampleScenes/HDTest/GraphicTest/Scripts/Editor/MaterialPlacerEditor.cs
  26. 13
      SampleScenes/HDTest/GraphicTest/Scripts/Editor/MaterialPlacerEditor.cs.meta

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


stringTagMap:
RenderType: Transparent
disabledShaderPasses:
- ForwardOnlyOpaque
- ForwardOnlyOpaqueDepthOnly
- ForwardOnlyOpaqueDepthOnly
- ForwardOnlyOpaque
- DepthOnly
- DepthForwardOnly
- ForwardOnly
- GBuffer
- GBufferWithPrepass
- MOTIONVECTORS

- DepthOnly
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:

3
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thickplane_Clear_ior101.mat


- _PPDPrimitiveWidth: 1
- _Parallax: 0.02
- _PerPixelDisplacementObjectScale: 1
- _PreRefractionPass: 0
- _PreTransparentPass: 0
- _RefractionAbsorptionEnable: 0
- _RefractionEnable: 0

- _ZTestMode: 8
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 1, g: 1, b: 1, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

3
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thickplane_Clear_ior15.mat


- _PPDPrimitiveWidth: 1
- _Parallax: 0.02
- _PerPixelDisplacementObjectScale: 1
- _PreRefractionPass: 0
- _PreTransparentPass: 0
- _RefractionAbsorptionEnable: 0
- _RefractionEnable: 0

- _ZTestMode: 8
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 1, g: 1, b: 1, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

3
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thickplane_Dragon.mat


- _PPDPrimitiveWidth: 1
- _Parallax: 0.02
- _PerPixelDisplacementObjectScale: 1
- _PreRefractionPass: 0
- _PreTransparentPass: 0
- _RefractionAbsorptionEnable: 0
- _RefractionEnable: 0

- _ZTestMode: 8
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 1, g: 1, b: 1, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

3
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thickplane_EarthMap.mat


- _PPDPrimitiveWidth: 1
- _Parallax: 0.02
- _PerPixelDisplacementObjectScale: 1
- _PreRefractionPass: 0
- _PreTransparentPass: 0
- _RefractionAbsorptionEnable: 0
- _RefractionEnable: 0

- _ZTestMode: 8
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 1, g: 1, b: 1, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

3
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thicksphere_Clear_ior101.mat


- _PPDPrimitiveWidth: 1
- _Parallax: 0.02
- _PerPixelDisplacementObjectScale: 1
- _PreRefractionPass: 0
- _PreTransparentPass: 0
- _RefractionAbsorptionEnable: 0
- _RefractionEnable: 0

- _ZTestMode: 8
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 1, g: 1, b: 1, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

3
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thicksphere_Clear_ior15.mat


- _PPDPrimitiveWidth: 1
- _Parallax: 0.02
- _PerPixelDisplacementObjectScale: 1
- _PreRefractionPass: 0
- _PreTransparentPass: 0
- _RefractionAbsorptionEnable: 0
- _RefractionEnable: 0

- _ZTestMode: 8
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 1, g: 1, b: 1, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

3
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thicksphere_Dragon.mat


- _PPDPrimitiveWidth: 1
- _Parallax: 0.02
- _PerPixelDisplacementObjectScale: 1
- _PreRefractionPass: 0
- _PreTransparentPass: 0
- _RefractionAbsorptionEnable: 0
- _RefractionEnable: 0

- _ZTestMode: 8
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 1, g: 1, b: 1, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

3
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thicksphere_EarthMap.mat


- _PPDPrimitiveWidth: 1
- _Parallax: 0.02
- _PerPixelDisplacementObjectScale: 1
- _PreRefractionPass: 0
- _PreTransparentPass: 0
- _RefractionAbsorptionEnable: 0
- _RefractionEnable: 0

- _ZTestMode: 8
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 1, g: 1, b: 1, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

7
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thicksphere_EarthMap_pretransparent.mat


m_Name: Mat_refraction_thicksphere_EarthMap_pretransparent
m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}
m_ShaderKeywords: _ALPHACUTOFFENABLE_OFF _BLENDMODE_LERP _MASKMAP _NORMALMAP_TANGENT_SPACE
_REFRACTION_THICKSPHERE _ROUGH_REFRACTION _ROUGH_REFRACTION_ON
_REFRACTION_ON _REFRACTION_THICKSPHERE _ROUGH_REFRACTION _ROUGH_REFRACTION_ON
m_CustomRenderQueue: 2750
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
disabledShaderPasses:

- _PPDPrimitiveWidth: 1
- _Parallax: 0.02
- _PerPixelDisplacementObjectScale: 1
- _PreRefractionPass: 0
- _PreTransparentPass: 1
- _RefractionAbsorptionEnable: 0
- _RefractionEnable: 0

- _ZTestMode: 8
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 0.428}
- _BaseColor: {r: 1, g: 1, b: 1, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

3
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thinplane_Clear_ior101.mat


- _PPDPrimitiveWidth: 1
- _Parallax: 0.02
- _PerPixelDisplacementObjectScale: 1
- _PreRefractionPass: 0
- _PreTransparentPass: 0
- _RefractionAbsorptionEnable: 0
- _RefractionEnable: 0

- _ZTestMode: 8
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 1, g: 1, b: 1, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

3
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thinplane_Clear_ior15.mat


- _PPDPrimitiveWidth: 1
- _Parallax: 0.02
- _PerPixelDisplacementObjectScale: 1
- _PreRefractionPass: 0
- _PreTransparentPass: 0
- _RefractionAbsorptionEnable: 0
- _RefractionEnable: 0

- _ZTestMode: 8
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 1, g: 1, b: 1, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

3
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thinplane_Dragon.mat


- _PPDPrimitiveWidth: 1
- _Parallax: 0.02
- _PerPixelDisplacementObjectScale: 1
- _PreRefractionPass: 0
- _PreTransparentPass: 0
- _RefractionAbsorptionEnable: 0
- _RefractionEnable: 0

- _ZTestMode: 8
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 1, g: 1, b: 1, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

3
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thinplane_EarthMap.mat


- _PPDPrimitiveWidth: 1
- _Parallax: 0.02
- _PerPixelDisplacementObjectScale: 1
- _PreRefractionPass: 0
- _PreTransparentPass: 0
- _RefractionAbsorptionEnable: 0
- _RefractionEnable: 0

- _ZTestMode: 8
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 1, g: 1, b: 1, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

89
SampleScenes/HDTest/GraphicTest/Scripts/MaterialPlacer.cs


using UnityEngine;
using UnityEngine.Serialization;
public enum TargetType
{
Float,
Color
}
[SerializeField]
Renderer m_Prefab;

Vector3 m_Size = Vector3.one;
[SerializeField]
string m_FloatName;
TargetType m_TargetType;
[SerializeField]
[FormerlySerializedAs("m_FloatName")]
string m_PropertyName;
[SerializeField]
[FormerlySerializedAs("m_FromValue")]
float m_FromValueFloat = 0;
[SerializeField]
[FormerlySerializedAs("m_ToValue")]
float m_ToValueFloat = 1;
float m_FromValue = 0;
Color m_FromValueColor = Color.white;
float m_ToValue = 1;
Color m_ToValueColor = Color.white;
int m_LastHash = 0;

var tr = transform;
var count = (float)(m_Cols * m_Rows - 1);
var _1_count = 1f / count;
var valueOffset = m_FromValue;
var valueStep = (m_ToValue - m_FromValue) * _1_count;
for (var j = 0; j < m_Cols; j++)
switch (m_TargetType)
for (var i = 0; i < m_Rows; i++)
case TargetType.Float:
{
var valueOffset = m_FromValueFloat;
var valueStep = (m_ToValueFloat - m_FromValueFloat) * _1_count;
for (var j = 0; j < m_Cols; j++)
{
for (var i = 0; i < m_Rows; i++)
{
var instance = Instantiate(m_Prefab);
var itr = instance.transform;
itr.SetParent(tr, false);
itr.localPosition = Vector3.Scale(positionStep, new Vector3(i, j, 0)) + positionOffset;
var mat = Instantiate(instance.sharedMaterial);
instance.material = mat;
var value = valueOffset + valueStep * (i + j * m_Rows);
instance.name = string.Format("{0} {1}", m_Prefab.name, value.ToString("F2"));
mat.SetFloat(m_PropertyName, value);
}
}
break;
}
case TargetType.Color:
var instance = Instantiate(m_Prefab);
var itr = instance.transform;
itr.SetParent(tr, false);
itr.localPosition = Vector3.Scale(positionStep, new Vector3(i, j, 0)) + positionOffset;
var mat = Instantiate(instance.sharedMaterial);
instance.material = mat;
var value = valueOffset + valueStep * (i + j * m_Rows);
instance.name = string.Format("{0} {1}", m_Prefab.name, value.ToString("F2"));
mat.SetFloat(m_FloatName, value);
var valueOffset = m_FromValueColor;
var valueStep = (m_ToValueColor - m_FromValueColor) * _1_count;
for (var j = 0; j < m_Cols; j++)
{
for (var i = 0; i < m_Rows; i++)
{
var instance = Instantiate(m_Prefab);
var itr = instance.transform;
itr.SetParent(tr, false);
itr.localPosition = Vector3.Scale(positionStep, new Vector3(i, j, 0)) + positionOffset;
var mat = Instantiate(instance.sharedMaterial);
instance.material = mat;
var value = valueOffset + valueStep * (i + j * m_Rows);
instance.name = string.Format("{0} {1}", m_Prefab.name, value.ToString("F2"));
mat.SetColor(m_PropertyName, value);
}
}
break;
}
}
}

int CalculateParameterHash()
{
if (m_Prefab == null || string.IsNullOrEmpty(m_FloatName))
if (m_Prefab == null || string.IsNullOrEmpty(m_PropertyName))
return 0;
return m_Prefab.GetInstanceID()

^ m_FloatName.GetHashCode()
^ m_FromValue.GetHashCode()
^ m_ToValue.GetHashCode();
^ m_PropertyName.GetHashCode()
^ m_FromValueFloat.GetHashCode()
^ m_ToValueFloat.GetHashCode();
}
void OnValidate()

5
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.cs


[SurfaceDataAttributes("Coat IOR")]
public float coatIOR; // Value is [0..1] for artists but the UI will display the value between [1..2]
// Only in forward
// Transparency
[SurfaceDataAttributes("Indice of refraction")]
public float ior;

[SurfaceDataAttributes("Transmittance Absorption Distance")]
public float atDistance;
[SurfaceDataAttributes("Refraction mask")]
public float refractionMask;
};
//-----------------------------------------------------------------------------

public float coatCoverage;
public float coatIOR; // CoatIOR is in range[1..2] it is surfaceData + 1
// Only in forward
public float refractionMask;
};
//-----------------------------------------------------------------------------

10
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.cs.hlsl


#define DEBUGVIEW_LIT_SURFACEDATA_IOR (1016)
#define DEBUGVIEW_LIT_SURFACEDATA_TRANSMITTANCE_COLOR (1017)
#define DEBUGVIEW_LIT_SURFACEDATA_AT_DISTANCE (1018)
#define DEBUGVIEW_LIT_SURFACEDATA_REFRACTION_MASK (1019)
//
// UnityEngine.Experimental.Rendering.HDPipeline.Lit+BSDFData: static fields

#define DEBUGVIEW_LIT_BSDFDATA_COAT_IOR (1050)
#define DEBUGVIEW_LIT_BSDFDATA_IOR (1051)
#define DEBUGVIEW_LIT_BSDFDATA_ABSORPTION_COEFFICIENT (1052)
#define DEBUGVIEW_LIT_BSDFDATA_REFRACTION_MASK (1053)
//
// UnityEngine.Experimental.Rendering.HDPipeline.Lit+GBufferMaterial: static fields

float ior;
float3 transmittanceColor;
float atDistance;
float refractionMask;
};
// Generated from UnityEngine.Experimental.Rendering.HDPipeline.Lit+BSDFData

float coatIOR;
float ior;
float3 absorptionCoefficient;
float refractionMask;
};
//

case DEBUGVIEW_LIT_SURFACEDATA_AT_DISTANCE:
result = surfacedata.atDistance.xxx;
break;
case DEBUGVIEW_LIT_SURFACEDATA_REFRACTION_MASK:
result = surfacedata.refractionMask.xxx;
break;
}
}

break;
case DEBUGVIEW_LIT_BSDFDATA_ABSORPTION_COEFFICIENT:
result = bsdfdata.absorptionCoefficient;
break;
case DEBUGVIEW_LIT_BSDFDATA_REFRACTION_MASK:
result = bsdfdata.refractionMask.xxx;
break;
}
}

9
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl


bsdfData.coatCoverage = coatCoverage;
}
void FillMaterialIdTransparencyData(float ior, float3 transmittanceColor, float atDistance, float thickness, inout BSDFData bsdfData)
void FillMaterialIdTransparencyData(float ior, float3 transmittanceColor, float atDistance, float thickness, float refractionMask, inout BSDFData bsdfData)
{
// Uses thickness from SSS's property set
bsdfData.ior = ior;

#else
bsdfData.thickness = max(0.000001, thickness);
#endif
bsdfData.refractionMask = refractionMask;
}
// For image based lighting, a part of the BSDF is pre-integrated.

#if defined(_REFRACTION_THINPLANE) || defined(_REFRACTION_THICKPLANE) || defined(_REFRACTION_THICKSPHERE)
// Note: Will override thickness of SSS's property set
FillMaterialIdTransparencyData(surfaceData.ior, surfaceData.transmittanceColor, surfaceData.atDistance, surfaceData.thickness, bsdfData);
FillMaterialIdTransparencyData(
surfaceData.ior, surfaceData.transmittanceColor, surfaceData.atDistance, surfaceData.thickness, surfaceData.refractionMask,
bsdfData);
#endif
return bsdfData;

// a. Get the corresponding color depending on the roughness from the gaussian pyramid of the color buffer
// b. Multiply by the transmittance for absorption (depends on the optical depth)
weight.x = 1.0;
weight.x = bsdfData.refractionMask;
float3 refractedBackPointWS = float3(0.0, 0.0, 0.0);
float opticalDepth = 0.0;

3
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitDataInternal.hlsl


surfaceData.atDistance = _ATDistance;
// Thickness already defined with SSS (from both thickness and thicknessMap)
surfaceData.thickness *= _ThicknessMultiplier;
surfaceData.refractionMask = 1.0 - alpha;
alpha = 1.0; // Transparency is done with refraction, not blending
surfaceData.refractionMask = 0.0;
#endif
surfaceData.coatNormalWS = input.worldToTangent[2].xyz; // Assign vertex normal

253
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thicksphere_EarthMap_RefractionMask.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_refraction_thicksphere_EarthMap_RefractionMask
m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}
m_ShaderKeywords: _ALPHACUTOFFENABLE_OFF _BLENDMODE_LERP _MASKMAP _NORMALMAP_TANGENT_SPACE
_PRETRANSPARENTPASS_OFF _REFRACTION_ON _REFRACTION_ROUGHNESS_ON _REFRACTION_THICKSPHERE
_ROUGH_REFRACTION _ROUGH_REFRACTION_ON
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
disabledShaderPasses:
- DistortionVectors
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: 2800000, guid: 40e200f786119ec4882d5a3630b178eb, type: 3}
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}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
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}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DiffuseLightingMap:
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}
- _EmissionMap:
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: 2800000, guid: 9edd5a06bcc2fec4398c5d34172f5d8d, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
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}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
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}
- _SpecularOcclusionMap:
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}
- _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: 1e+15
- _AlbedoAffectEmissive: 0
- _AlphaCutoff: 0.5
- _AlphaCutoffEnable: 0
- _Anisotropy: 0
- _BlendMode: 0
- _BumpScale: 1
- _CoatCoverage: 1
- _CoatIOR: 0.5
- _CullMode: 2
- _Cutoff: 0.5
- _DepthOffsetEnable: 0
- _DetailAlbedoScale: 1
- _DetailNormalMapScale: 1
- _DetailNormalScale: 1
- _DetailSmoothnessScale: 1
- _DisplacementLockObjectScale: 1
- _DisplacementLockTilingScale: 1
- _DisplacementMode: 0
- _DistortionBlendMode: 0
- _DistortionBlurBlendMode: 0
- _DistortionBlurDstBlend: 1
- _DistortionBlurRemapMax: 1
- _DistortionBlurRemapMin: 0
- _DistortionBlurScale: 1
- _DistortionBlurSrcBlend: 1
- _DistortionDepthTest: 0
- _DistortionDstBlend: 1
- _DistortionEnable: 0
- _DistortionOnly: 0
- _DistortionScale: 1
- _DistortionSrcBlend: 1
- _DoubleSidedEnable: 0
- _DoubleSidedMirrorEnable: 1
- _DoubleSidedMode: 0
- _DoubleSidedNormalMode: 1
- _Drag: 1
- _DstBlend: 10
- _EmissiveColorMode: 1
- _EmissiveIntensity: 0
- _EnablePerPixelDisplacement: 0
- _EnableSpecularOcclusion: 0
- _EnableVertexDisplacement: 0
- _EnableWind: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _HeightAmplitude: 0.02
- _HeightBias: 0
- _HeightCenter: 0.5
- _HeightMapMode: 0
- _HeightMax: 1
- _HeightMin: -1
- _HeightScale: 1
- _HorizonFade: 1
- _IOR: 1.5
- _InitialBend: 1
- _InvTilingScale: 1
- _LinkDetailsWithBase: 1
- _MaterialID: 1
- _Metalic: 1
- _Metallic: 0.04
- _Mode: 0
- _NormalMapSpace: 0
- _NormalScale: 1
- _OcclusionStrength: 1
- _PPDLodThreshold: 5
- _PPDMaxSamples: 15
- _PPDMinSamples: 5
- _PPDPrimitiveLength: 1
- _PPDPrimitiveWidth: 1
- _Parallax: 0.02
- _PerPixelDisplacementObjectScale: 1
- _PreRefractionPass: 0
- _PreTransparentPass: 0
- _RefractionAbsorptionEnable: 0
- _RefractionEnable: 0
- _RefractionMode: 2
- _RoughRefractionEnable: 1
- _ShiverDirectionality: 0.5
- _ShiverDrag: 0.2
- _Smoothness: 1
- _SmoothnessRemapMax: 0.89410985
- _SmoothnessRemapMin: 0.6485771
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 5
- _StencilRef: 2
- _Stiffness: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1
- _SurfaceType: 1
- _TexWorldScale: 1
- _Thickness: 0.747
- _ThicknessMultiplier: 1
- _UVBase: 0
- _UVDetail: 0
- _UVMappingPlanar: 0
- _UVSec: 0
- _VertexDisplacementObjectScale: 1
- _VertexDisplacementTilingScale: 1
- _ZTestMode: 8
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 0.047}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
- _InvPrimScale: {r: 1, g: 1, b: 0, a: 0}
- _RefractionAbsorption: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _TransmittanceColor: {r: 0.816, g: 0.6632562, b: 0.374544, a: 1}
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}

8
SampleScenes/HDTest/GraphicTest/Common/Material/Mat_refraction_thicksphere_EarthMap_RefractionMask.mat.meta


fileFormatVersion: 2
guid: c03aba20570576e4193033a85457d502
timeCreated: 1448039507
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

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

77
SampleScenes/HDTest/GraphicTest/Common/Textures/EarthColorandMask.png.meta


fileFormatVersion: 2
guid: 40e200f786119ec4882d5a3630b178eb
timeCreated: 1508142564
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: 1
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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

10
SampleScenes/HDTest/GraphicTest/Scripts/Editor.meta


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

67
SampleScenes/HDTest/GraphicTest/Scripts/Editor/MaterialPlacerEditor.cs


using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(MaterialPlacer))]
public class MaterialPlacerEditor : Editor
{
SerializedProperty m_TargetType;
SerializedProperty m_Prefab;
SerializedProperty m_Rows;
SerializedProperty m_Cols;
SerializedProperty m_Size;
SerializedProperty m_PropertyName;
SerializedProperty m_FromValueFloat;
SerializedProperty m_ToValueFloat;
SerializedProperty m_FromValueColor;
SerializedProperty m_ToValueColor;
void OnEnable()
{
m_TargetType = serializedObject.FindProperty("m_TargetType");
m_Prefab = serializedObject.FindProperty("m_Prefab");
m_Rows = serializedObject.FindProperty("m_Rows");
m_Cols = serializedObject.FindProperty("m_Cols");
m_Size = serializedObject.FindProperty("m_Size");
m_PropertyName = serializedObject.FindProperty("m_PropertyName");
m_FromValueFloat = serializedObject.FindProperty("m_FromValueFloat");
m_ToValueFloat = serializedObject.FindProperty("m_ToValueFloat");
m_FromValueColor = serializedObject.FindProperty("m_FromValueColor");
m_ToValueColor = serializedObject.FindProperty("m_ToValueColor");
}
public override void OnInspectorGUI()
{
serializedObject.Update();
EditorGUI.BeginChangeCheck();
EditorGUILayout.PropertyField(m_Prefab);
EditorGUILayout.PropertyField(m_Rows);
EditorGUILayout.PropertyField(m_Cols);
EditorGUILayout.PropertyField(m_Size);
EditorGUILayout.PropertyField(m_PropertyName);
EditorGUILayout.Space();
EditorGUILayout.PropertyField(m_TargetType);
var targetTypeValue = (MaterialPlacer.TargetType)m_TargetType.enumValueIndex;
switch (targetTypeValue)
{
case MaterialPlacer.TargetType.Color:
{
EditorGUILayout.PropertyField(m_FromValueColor);
EditorGUILayout.PropertyField(m_ToValueColor);
break;
}
case MaterialPlacer.TargetType.Float:
{
EditorGUILayout.PropertyField(m_FromValueFloat);
EditorGUILayout.PropertyField(m_ToValueFloat);
break;
}
}
if (EditorGUI.EndChangeCheck())
serializedObject.ApplyModifiedProperties();
}
}

13
SampleScenes/HDTest/GraphicTest/Scripts/Editor/MaterialPlacerEditor.cs.meta


fileFormatVersion: 2
guid: a31359091e7bcc84f890440582a0a818
timeCreated: 1508140871
licenseType: Pro
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

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

正在加载...
取消
保存