浏览代码

More file update

/iridesence
Sebastien Lagarde 7 年前
当前提交
14afb03c
共有 5 个文件被更改,包括 180 次插入140 次删除
  1. 6
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/LayeredLit/LayeredLitUI.cs
  2. 12
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/Lit/BaseLitUI.cs
  3. 40
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/Lit/LitUI.cs
  4. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.cs
  5. 260
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.cs.hlsl

6
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/LayeredLit/LayeredLitUI.cs


}
CoreUtils.SetKeyword(material, "_DENSITY_MODE", useDensityModeEnable);
LitGUI.MaterialId materialId = (LitGUI.MaterialId)material.GetFloat(kMaterialID);
BaseLitGUI.MaterialId materialId = (BaseLitGUI.MaterialId)material.GetFloat(kMaterialID);
CoreUtils.SetKeyword(material, "_MATERIAL_FEATURE_SUBSURFACE_SCATTERING", materialId == LitGUI.MaterialId.LitSSS);
CoreUtils.SetKeyword(material, "_MATERIAL_FEATURE_TRANSMISSION", materialId == LitGUI.MaterialId.LitSSS);
CoreUtils.SetKeyword(material, "_MATERIAL_FEATURE_SUBSURFACE_SCATTERING", materialId == BaseLitGUI.MaterialId.LitSSS);
CoreUtils.SetKeyword(material, "_MATERIAL_FEATURE_TRANSMISSION", materialId == BaseLitGUI.MaterialId.LitSSS);
}
private void DoEmissiveGUI(Material material)
{

12
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/Lit/BaseLitUI.cs


Tessellation
}
public enum MaterialId
{
LitSSS = 0,
LitStandard = 1,
LitAniso = 2,
LitClearCoat = 3,
LitSpecular = 4,
LitIridescence = 5,
};
protected MaterialProperty doubleSidedNormalMode = null;
protected const string kDoubleSidedNormalMode = "_DoubleSidedNormalMode";
protected MaterialProperty depthOffsetEnable = null;

// Set the reference value for the stencil test.
int stencilRef = (int)StencilLightingUsage.RegularLighting;
if ((int)material.GetFloat(kMaterialID) == (int)Lit.MaterialId.LitSSS)
if ((int)material.GetFloat(kMaterialID) == (int)BaseLitGUI.MaterialId.LitSSS)
{
stencilRef = (int)StencilLightingUsage.SplitLighting;
}

40
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/Lit/LitUI.cs


UV3
}
public enum MaterialId
{
LitSSS = 0,
LitStandard = 1,
LitAniso = 2,
LitClearCoat = 3,
LitSpecular = 4,
LitIridescence = 5,
};
protected MaterialProperty[] UVBase = new MaterialProperty[kMaxLayerCount];
protected const string kUVBase = "_UVBase";
protected MaterialProperty[] TexWorldScale = new MaterialProperty[kMaxLayerCount];

m_MaterialEditor.TexturePropertySingleLine(Styles.baseColorText, baseColorMap[layerIndex], baseColor[layerIndex]);
if ((LitGUI.MaterialId)materialID.floatValue == LitGUI.MaterialId.LitStandard || (LitGUI.MaterialId)materialID.floatValue == LitGUI.MaterialId.LitAniso)
if ((BaseLitGUI.MaterialId)materialID.floatValue == BaseLitGUI.MaterialId.LitStandard || (BaseLitGUI.MaterialId)materialID.floatValue == BaseLitGUI.MaterialId.LitAniso)
{
m_MaterialEditor.ShaderProperty(metallic[layerIndex], Styles.metallicText);
}

}
}
m_MaterialEditor.TexturePropertySingleLine(((LitGUI.MaterialId)materialID.floatValue == LitGUI.MaterialId.LitSpecular) ? Styles.maskMapSpecularText : Styles.maskMapSText, maskMap[layerIndex]);
m_MaterialEditor.TexturePropertySingleLine(((BaseLitGUI.MaterialId)materialID.floatValue == BaseLitGUI.MaterialId.LitSpecular) ? Styles.maskMapSpecularText : Styles.maskMapSText, maskMap[layerIndex]);
m_MaterialEditor.ShaderProperty(normalMapSpace[layerIndex], Styles.normalMapSpaceText);

heightAmplitude[layerIndex].floatValue = (heightMax[layerIndex].floatValue - heightMin[layerIndex].floatValue) * 0.01f; // Conversion centimeters to meters.
}
switch ((LitGUI.MaterialId)materialID.floatValue)
switch ((BaseLitGUI.MaterialId)materialID.floatValue)
case LitGUI.MaterialId.LitSSS:
case BaseLitGUI.MaterialId.LitSSS:
case LitGUI.MaterialId.LitStandard:
case BaseLitGUI.MaterialId.LitStandard:
case LitGUI.MaterialId.LitAniso:
case BaseLitGUI.MaterialId.LitAniso:
case LitGUI.MaterialId.LitSpecular:
case BaseLitGUI.MaterialId.LitSpecular:
case LitGUI.MaterialId.LitClearCoat:
case BaseLitGUI.MaterialId.LitClearCoat:
ShaderClearCoatInputGUI();
break;
default:

material.DisableKeyword("_REQUIRE_UV3");
}
LitGUI.MaterialId materialId = (LitGUI.MaterialId)material.GetFloat(kMaterialID);
BaseLitGUI.MaterialId materialId = (BaseLitGUI.MaterialId)material.GetFloat(kMaterialID);
CoreUtils.SetKeyword(material, "_MATERIAL_FEATURE_SUBSURFACE_SCATTERING", materialId == LitGUI.MaterialId.LitSSS);
CoreUtils.SetKeyword(material, "_MATERIAL_FEATURE_TRANSMISSION", materialId == LitGUI.MaterialId.LitSSS);
CoreUtils.SetKeyword(material, "_MATERIAL_FEATURE_ANISOTROPY", materialId == LitGUI.MaterialId.LitAniso);
CoreUtils.SetKeyword(material, "_MATERIAL_FEATURE_CLEAR_COAT", materialId == LitGUI.MaterialId.LitClearCoat);
CoreUtils.SetKeyword(material, "_MATERIAL_FEATURE_IRIDESCENCE", materialId == LitGUI.MaterialId.LitIridescence);
CoreUtils.SetKeyword(material, "_MATERIAL_FEATURE_SPECULAR_COLOR", materialId == LitGUI.MaterialId.LitSpecular);
CoreUtils.SetKeyword(material, "_MATERIAL_FEATURE_SUBSURFACE_SCATTERING", materialId == BaseLitGUI.MaterialId.LitSSS);
CoreUtils.SetKeyword(material, "_MATERIAL_FEATURE_TRANSMISSION", materialId == BaseLitGUI.MaterialId.LitSSS);
CoreUtils.SetKeyword(material, "_MATERIAL_FEATURE_ANISOTROPY", materialId == BaseLitGUI.MaterialId.LitAniso);
CoreUtils.SetKeyword(material, "_MATERIAL_FEATURE_CLEAR_COAT", materialId == BaseLitGUI.MaterialId.LitClearCoat);
CoreUtils.SetKeyword(material, "_MATERIAL_FEATURE_IRIDESCENCE", materialId == BaseLitGUI.MaterialId.LitIridescence);
CoreUtils.SetKeyword(material, "_MATERIAL_FEATURE_SPECULAR_COLOR", materialId == BaseLitGUI.MaterialId.LitSpecular);
var refractionModeValue = (Lit.RefractionMode)material.GetFloat(kRefractionMode);
// We can't have refraction in pre-refraction queue

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.cs


LitSubsurfaceScattering = 1 << 0,
LitTransmission = 1 << 1,
LitAnisotropy = 1 << 2,
LitIrridescence = 1 << 3,
LitIridescence = 1 << 3,
LitClearCoat = 1 << 4
};

260
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.cs.hlsl


#ifndef LIT_CS_HLSL
#define LIT_CS_HLSL
//
// UnityEngine.Experimental.Rendering.HDPipeline.Lit+MaterialId: static fields
//
#define MATERIALID_LIT_SSS (0)
#define MATERIALID_LIT_STANDARD (1)
#define MATERIALID_LIT_ANISO (2)
#define MATERIALID_LIT_CLEAR_COAT (3)
#define MATERIALID_LIT_SPECULAR (4)
//
#define MATERIALFEATUREFLAGS_LIT_SSS (1)
#define MATERIALFEATUREFLAGS_LIT_STANDARD (2)
#define MATERIALFEATUREFLAGS_LIT_ANISO (4)
#define MATERIALFEATUREFLAGS_LIT_CLEAR_COAT (8)
//
// UnityEngine.Experimental.Rendering.HDPipeline.Lit+StandardDefinitions: static fields
//
#define GBUFFER_LIT_STANDARD_REGULAR_ID (0)
#define GBUFFER_LIT_STANDARD_SPECULAR_COLOR_ID (1)
#define DEFAULT_SPECULAR_VALUE (0.04)
#define MATERIALFEATUREFLAGS_LIT_SUBSURFACE_SCATTERING (1)
#define MATERIALFEATUREFLAGS_LIT_TRANSMISSION (2)
#define MATERIALFEATUREFLAGS_LIT_ANISOTROPY (4)
#define MATERIALFEATUREFLAGS_LIT_IRIDESCENCE (8)
#define MATERIALFEATUREFLAGS_LIT_CLEAR_COAT (16)
//
// UnityEngine.Experimental.Rendering.HDPipeline.Lit+RefractionMode: static fields

//
// UnityEngine.Experimental.Rendering.HDPipeline.Lit+SurfaceData: static fields
//
#define DEBUGVIEW_LIT_SURFACEDATA_BASE_COLOR (1000)
#define DEBUGVIEW_LIT_SURFACEDATA_SPECULAR_OCCLUSION (1001)
#define DEBUGVIEW_LIT_SURFACEDATA_NORMAL_WS (1002)
#define DEBUGVIEW_LIT_SURFACEDATA_PERCEPTUAL_SMOOTHNESS (1003)
#define DEBUGVIEW_LIT_SURFACEDATA_MATERIAL_ID (1004)
#define DEBUGVIEW_LIT_SURFACEDATA_AMBIENT_OCCLUSION (1005)
#define DEBUGVIEW_LIT_SURFACEDATA_TANGENT_WS (1006)
#define DEBUGVIEW_LIT_SURFACEDATA_ANISOTROPY (1007)
#define DEBUGVIEW_LIT_SURFACEDATA_METALLIC (1008)
#define DEBUGVIEW_LIT_SURFACEDATA_SUBSURFACE_MASK (1009)
#define DEBUGVIEW_LIT_SURFACEDATA_THICKNESS (1010)
#define DEBUGVIEW_LIT_SURFACEDATA_DIFFUSION_PROFILE (1011)
#define DEBUGVIEW_LIT_SURFACEDATA_SPECULAR_COLOR (1012)
#define DEBUGVIEW_LIT_SURFACEDATA_COAT_MASK (1013)
#define DEBUGVIEW_LIT_SURFACEDATA_IOR (1014)
#define DEBUGVIEW_LIT_SURFACEDATA_TRANSMITTANCE_COLOR (1015)
#define DEBUGVIEW_LIT_SURFACEDATA_AT_DISTANCE (1016)
#define DEBUGVIEW_LIT_SURFACEDATA_TRANSMITTANCE_MASK (1017)
#define DEBUGVIEW_LIT_SURFACEDATA_ENABLE_SPECULAR_COLOR (1000)
#define DEBUGVIEW_LIT_SURFACEDATA_ENABLE_SUBSURFACE_SCATTERING (1001)
#define DEBUGVIEW_LIT_SURFACEDATA_ENABLE_TRANSMISSION (1002)
#define DEBUGVIEW_LIT_SURFACEDATA_ENABLE_ANISOTROPY (1003)
#define DEBUGVIEW_LIT_SURFACEDATA_ENABLE_IRIDESCENCE (1004)
#define DEBUGVIEW_LIT_SURFACEDATA_ENABLE_CLEAR_COAT (1005)
#define DEBUGVIEW_LIT_SURFACEDATA_BASE_COLOR (1006)
#define DEBUGVIEW_LIT_SURFACEDATA_SPECULAR_OCCLUSION (1007)
#define DEBUGVIEW_LIT_SURFACEDATA_NORMAL_WS (1008)
#define DEBUGVIEW_LIT_SURFACEDATA_PERCEPTUAL_SMOOTHNESS (1009)
#define DEBUGVIEW_LIT_SURFACEDATA_AMBIENT_OCCLUSION (1010)
#define DEBUGVIEW_LIT_SURFACEDATA_METALLIC (1011)
#define DEBUGVIEW_LIT_SURFACEDATA_COAT_MASK (1012)
#define DEBUGVIEW_LIT_SURFACEDATA_SPECULAR_COLOR (1013)
#define DEBUGVIEW_LIT_SURFACEDATA_DIFFUSION_PROFILE (1014)
#define DEBUGVIEW_LIT_SURFACEDATA_SUBSURFACE_MASK (1015)
#define DEBUGVIEW_LIT_SURFACEDATA_THICKNESS (1016)
#define DEBUGVIEW_LIT_SURFACEDATA_TANGENT_WS (1017)
#define DEBUGVIEW_LIT_SURFACEDATA_ANISOTROPY (1018)
#define DEBUGVIEW_LIT_SURFACEDATA_THICKNESS_IRID (1019)
#define DEBUGVIEW_LIT_SURFACEDATA_IOR (1020)
#define DEBUGVIEW_LIT_SURFACEDATA_TRANSMITTANCE_COLOR (1021)
#define DEBUGVIEW_LIT_SURFACEDATA_AT_DISTANCE (1022)
#define DEBUGVIEW_LIT_SURFACEDATA_TRANSMITTANCE_MASK (1023)
#define DEBUGVIEW_LIT_BSDFDATA_DIFFUSE_COLOR (1030)
#define DEBUGVIEW_LIT_BSDFDATA_FRESNEL0 (1031)
#define DEBUGVIEW_LIT_BSDFDATA_SPECULAR_OCCLUSION (1032)
#define DEBUGVIEW_LIT_BSDFDATA_NORMAL_WS (1033)
#define DEBUGVIEW_LIT_BSDFDATA_PERCEPTUAL_ROUGHNESS (1034)
#define DEBUGVIEW_LIT_BSDFDATA_MATERIAL_ID (1035)
#define DEBUGVIEW_LIT_BSDFDATA_TANGENT_WS (1036)
#define DEBUGVIEW_LIT_BSDFDATA_BITANGENT_WS (1037)
#define DEBUGVIEW_LIT_BSDFDATA_ROUGHNESS_T (1038)
#define DEBUGVIEW_LIT_BSDFDATA_ROUGHNESS_B (1039)
#define DEBUGVIEW_LIT_BSDFDATA_ANISOTROPY (1040)
#define DEBUGVIEW_LIT_BSDFDATA_SUBSURFACE_MASK (1041)
#define DEBUGVIEW_LIT_BSDFDATA_THICKNESS (1042)
#define DEBUGVIEW_LIT_BSDFDATA_DIFFUSION_PROFILE (1043)
#define DEBUGVIEW_LIT_BSDFDATA_ENABLE_TRANSMISSION (1044)
#define DEBUGVIEW_LIT_BSDFDATA_ENABLE_SPECULAR_COLOR (1030)
#define DEBUGVIEW_LIT_BSDFDATA_ENABLE_SUBSURFACE_SCATTERING (1031)
#define DEBUGVIEW_LIT_BSDFDATA_ENABLE_TRANSMISSION (1032)
#define DEBUGVIEW_LIT_BSDFDATA_ENABLE_ANISOTROPY (1033)
#define DEBUGVIEW_LIT_BSDFDATA_ENABLE_IRIDESCENCE (1034)
#define DEBUGVIEW_LIT_BSDFDATA_ENABLE_CLEAR_COAT (1035)
#define DEBUGVIEW_LIT_BSDFDATA_DIFFUSE_COLOR (1036)
#define DEBUGVIEW_LIT_BSDFDATA_FRESNEL0 (1037)
#define DEBUGVIEW_LIT_BSDFDATA_SPECULAR_OCCLUSION (1038)
#define DEBUGVIEW_LIT_BSDFDATA_NORMAL_WS (1039)
#define DEBUGVIEW_LIT_BSDFDATA_PERCEPTUAL_ROUGHNESS (1040)
#define DEBUGVIEW_LIT_BSDFDATA_COAT_MASK (1041)
#define DEBUGVIEW_LIT_BSDFDATA_DIFFUSION_PROFILE (1042)
#define DEBUGVIEW_LIT_BSDFDATA_SUBSURFACE_MASK (1043)
#define DEBUGVIEW_LIT_BSDFDATA_THICKNESS (1044)
#define DEBUGVIEW_LIT_BSDFDATA_COAT_MASK (1047)
#define DEBUGVIEW_LIT_BSDFDATA_COAT_ROUGHNESS (1048)
#define DEBUGVIEW_LIT_BSDFDATA_IOR (1049)
#define DEBUGVIEW_LIT_BSDFDATA_ABSORPTION_COEFFICIENT (1050)
#define DEBUGVIEW_LIT_BSDFDATA_TRANSMITTANCE_MASK (1051)
#define DEBUGVIEW_LIT_BSDFDATA_TANGENT_WS (1047)
#define DEBUGVIEW_LIT_BSDFDATA_BITANGENT_WS (1048)
#define DEBUGVIEW_LIT_BSDFDATA_ROUGHNESS_T (1049)
#define DEBUGVIEW_LIT_BSDFDATA_ROUGHNESS_B (1050)
#define DEBUGVIEW_LIT_BSDFDATA_ANISOTROPY (1051)
#define DEBUGVIEW_LIT_BSDFDATA_THICKNESS_IRID (1052)
#define DEBUGVIEW_LIT_BSDFDATA_COAT_ROUGHNESS (1053)
#define DEBUGVIEW_LIT_BSDFDATA_IOR (1054)
#define DEBUGVIEW_LIT_BSDFDATA_ABSORPTION_COEFFICIENT (1055)
#define DEBUGVIEW_LIT_BSDFDATA_TRANSMITTANCE_MASK (1056)
//
// UnityEngine.Experimental.Rendering.HDPipeline.Lit+GBufferMaterial: static fields

// PackingRules = Exact
struct SurfaceData
{
bool enableSpecularColor;
bool enableSubsurfaceScattering;
bool enableTransmission;
bool enableAnisotropy;
bool enableIridescence;
bool enableClearCoat;
int materialId;
float3 tangentWS;
float anisotropy;
float coatMask;
float3 specularColor;
int diffusionProfile;
int diffusionProfile;
float3 specularColor;
float coatMask;
float3 tangentWS;
float anisotropy;
float thicknessIrid;
float ior;
float3 transmittanceColor;
float atDistance;

// PackingRules = Exact
struct BSDFData
{
bool enableSpecularColor;
bool enableSubsurfaceScattering;
bool enableTransmission;
bool enableAnisotropy;
bool enableIridescence;
bool enableClearCoat;
int materialId;
float coatMask;
int diffusionProfile;
float subsurfaceMask;
float thickness;
bool useThickObjectMode;
float3 transmittance;
float subsurfaceMask;
float thickness;
int diffusionProfile;
bool enableTransmission;
bool useThickObjectMode;
float3 transmittance;
float coatMask;
float thicknessIrid;
float coatRoughness;
float ior;
float3 absorptionCoefficient;

{
switch (paramId)
{
case DEBUGVIEW_LIT_SURFACEDATA_ENABLE_SPECULAR_COLOR:
result = (surfacedata.enableSpecularColor) ? float3(1.0, 1.0, 1.0) : float3(0.0, 0.0, 0.0);
break;
case DEBUGVIEW_LIT_SURFACEDATA_ENABLE_SUBSURFACE_SCATTERING:
result = (surfacedata.enableSubsurfaceScattering) ? float3(1.0, 1.0, 1.0) : float3(0.0, 0.0, 0.0);
break;
case DEBUGVIEW_LIT_SURFACEDATA_ENABLE_TRANSMISSION:
result = (surfacedata.enableTransmission) ? float3(1.0, 1.0, 1.0) : float3(0.0, 0.0, 0.0);
break;
case DEBUGVIEW_LIT_SURFACEDATA_ENABLE_ANISOTROPY:
result = (surfacedata.enableAnisotropy) ? float3(1.0, 1.0, 1.0) : float3(0.0, 0.0, 0.0);
break;
case DEBUGVIEW_LIT_SURFACEDATA_ENABLE_IRIDESCENCE:
result = (surfacedata.enableIridescence) ? float3(1.0, 1.0, 1.0) : float3(0.0, 0.0, 0.0);
break;
case DEBUGVIEW_LIT_SURFACEDATA_ENABLE_CLEAR_COAT:
result = (surfacedata.enableClearCoat) ? float3(1.0, 1.0, 1.0) : float3(0.0, 0.0, 0.0);
break;
case DEBUGVIEW_LIT_SURFACEDATA_BASE_COLOR:
result = surfacedata.baseColor;
needLinearToSRGB = true;

case DEBUGVIEW_LIT_SURFACEDATA_PERCEPTUAL_SMOOTHNESS:
result = surfacedata.perceptualSmoothness.xxx;
break;
case DEBUGVIEW_LIT_SURFACEDATA_MATERIAL_ID:
result = GetIndexColor(surfacedata.materialId);
break;
case DEBUGVIEW_LIT_SURFACEDATA_TANGENT_WS:
result = surfacedata.tangentWS * 0.5 + 0.5;
break;
case DEBUGVIEW_LIT_SURFACEDATA_ANISOTROPY:
result = surfacedata.anisotropy.xxx;
break;
case DEBUGVIEW_LIT_SURFACEDATA_COAT_MASK:
result = surfacedata.coatMask.xxx;
break;
case DEBUGVIEW_LIT_SURFACEDATA_SPECULAR_COLOR:
result = surfacedata.specularColor;
needLinearToSRGB = true;
break;
case DEBUGVIEW_LIT_SURFACEDATA_DIFFUSION_PROFILE:
result = GetIndexColor(surfacedata.diffusionProfile);
break;
case DEBUGVIEW_LIT_SURFACEDATA_SUBSURFACE_MASK:
result = surfacedata.subsurfaceMask.xxx;
break;

case DEBUGVIEW_LIT_SURFACEDATA_DIFFUSION_PROFILE:
result = GetIndexColor(surfacedata.diffusionProfile);
case DEBUGVIEW_LIT_SURFACEDATA_TANGENT_WS:
result = surfacedata.tangentWS * 0.5 + 0.5;
case DEBUGVIEW_LIT_SURFACEDATA_SPECULAR_COLOR:
result = surfacedata.specularColor;
needLinearToSRGB = true;
case DEBUGVIEW_LIT_SURFACEDATA_ANISOTROPY:
result = surfacedata.anisotropy.xxx;
case DEBUGVIEW_LIT_SURFACEDATA_COAT_MASK:
result = surfacedata.coatMask.xxx;
case DEBUGVIEW_LIT_SURFACEDATA_THICKNESS_IRID:
result = surfacedata.thicknessIrid.xxx;
break;
case DEBUGVIEW_LIT_SURFACEDATA_IOR:
result = surfacedata.ior.xxx;

{
switch (paramId)
{
case DEBUGVIEW_LIT_BSDFDATA_ENABLE_SPECULAR_COLOR:
result = (bsdfdata.enableSpecularColor) ? float3(1.0, 1.0, 1.0) : float3(0.0, 0.0, 0.0);
break;
case DEBUGVIEW_LIT_BSDFDATA_ENABLE_SUBSURFACE_SCATTERING:
result = (bsdfdata.enableSubsurfaceScattering) ? float3(1.0, 1.0, 1.0) : float3(0.0, 0.0, 0.0);
break;
case DEBUGVIEW_LIT_BSDFDATA_ENABLE_TRANSMISSION:
result = (bsdfdata.enableTransmission) ? float3(1.0, 1.0, 1.0) : float3(0.0, 0.0, 0.0);
break;
case DEBUGVIEW_LIT_BSDFDATA_ENABLE_ANISOTROPY:
result = (bsdfdata.enableAnisotropy) ? float3(1.0, 1.0, 1.0) : float3(0.0, 0.0, 0.0);
break;
case DEBUGVIEW_LIT_BSDFDATA_ENABLE_IRIDESCENCE:
result = (bsdfdata.enableIridescence) ? float3(1.0, 1.0, 1.0) : float3(0.0, 0.0, 0.0);
break;
case DEBUGVIEW_LIT_BSDFDATA_ENABLE_CLEAR_COAT:
result = (bsdfdata.enableClearCoat) ? float3(1.0, 1.0, 1.0) : float3(0.0, 0.0, 0.0);
break;
case DEBUGVIEW_LIT_BSDFDATA_DIFFUSE_COLOR:
result = bsdfdata.diffuseColor;
needLinearToSRGB = true;

case DEBUGVIEW_LIT_BSDFDATA_PERCEPTUAL_ROUGHNESS:
result = bsdfdata.perceptualRoughness.xxx;
break;
case DEBUGVIEW_LIT_BSDFDATA_MATERIAL_ID:
result = GetIndexColor(bsdfdata.materialId);
case DEBUGVIEW_LIT_BSDFDATA_COAT_MASK:
result = bsdfdata.coatMask.xxx;
break;
case DEBUGVIEW_LIT_BSDFDATA_DIFFUSION_PROFILE:
result = GetIndexColor(bsdfdata.diffusionProfile);
break;
case DEBUGVIEW_LIT_BSDFDATA_SUBSURFACE_MASK:
result = bsdfdata.subsurfaceMask.xxx;
break;
case DEBUGVIEW_LIT_BSDFDATA_THICKNESS:
result = bsdfdata.thickness.xxx;
break;
case DEBUGVIEW_LIT_BSDFDATA_USE_THICK_OBJECT_MODE:
result = (bsdfdata.useThickObjectMode) ? float3(1.0, 1.0, 1.0) : float3(0.0, 0.0, 0.0);
break;
case DEBUGVIEW_LIT_BSDFDATA_TRANSMITTANCE:
result = bsdfdata.transmittance;
break;
case DEBUGVIEW_LIT_BSDFDATA_TANGENT_WS:
result = bsdfdata.tangentWS * 0.5 + 0.5;

case DEBUGVIEW_LIT_BSDFDATA_ANISOTROPY:
result = bsdfdata.anisotropy.xxx;
break;
case DEBUGVIEW_LIT_BSDFDATA_SUBSURFACE_MASK:
result = bsdfdata.subsurfaceMask.xxx;
break;
case DEBUGVIEW_LIT_BSDFDATA_THICKNESS:
result = bsdfdata.thickness.xxx;
break;
case DEBUGVIEW_LIT_BSDFDATA_DIFFUSION_PROFILE:
result = GetIndexColor(bsdfdata.diffusionProfile);
break;
case DEBUGVIEW_LIT_BSDFDATA_ENABLE_TRANSMISSION:
result = (bsdfdata.enableTransmission) ? float3(1.0, 1.0, 1.0) : float3(0.0, 0.0, 0.0);
break;
case DEBUGVIEW_LIT_BSDFDATA_USE_THICK_OBJECT_MODE:
result = (bsdfdata.useThickObjectMode) ? float3(1.0, 1.0, 1.0) : float3(0.0, 0.0, 0.0);
break;
case DEBUGVIEW_LIT_BSDFDATA_TRANSMITTANCE:
result = bsdfdata.transmittance;
break;
case DEBUGVIEW_LIT_BSDFDATA_COAT_MASK:
result = bsdfdata.coatMask.xxx;
case DEBUGVIEW_LIT_BSDFDATA_THICKNESS_IRID:
result = bsdfdata.thicknessIrid.xxx;
break;
case DEBUGVIEW_LIT_BSDFDATA_COAT_ROUGHNESS:
result = bsdfdata.coatRoughness.xxx;

正在加载...
取消
保存