浏览代码

more update

/Yibing-Project-2
Sebastien Lagarde 7 年前
当前提交
c815cbdb
共有 8 个文件被更改,包括 242 次插入23 次删除
  1. 114
      SampleScenes/HDTest/GraphicTest/Two Sided/Material/GroundLeaf_DoubleSided.mat
  2. 60
      SampleScenes/HDTest/GraphicTest/Two Sided/Material/GroundLeaf_DoubleSidedMirror.mat
  3. 20
      ScriptableRenderPipeline/HDRenderPipeline/Material/Character/Character.shader
  4. 17
      ScriptableRenderPipeline/HDRenderPipeline/Material/Character/CharacterData.hlsl
  5. 15
      ScriptableRenderPipeline/HDRenderPipeline/Material/Eye/EyeData.hlsl
  6. 13
      ScriptableRenderPipeline/HDRenderPipeline/Material/Fabric/FabricData.hlsl
  7. 13
      ScriptableRenderPipeline/HDRenderPipeline/Material/Hair/HairData.hlsl
  8. 13
      ScriptableRenderPipeline/HDRenderPipeline/Material/Vegetation/VegetationData.hlsl

114
SampleScenes/HDTest/GraphicTest/Two Sided/Material/GroundLeaf_DoubleSided.mat


m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: GroundLeaf_DoubleSided
m_Shader: {fileID: 4800000, guid: c4edd00ff2db5b24391a4fcb1762e459, type: 3}
m_ShaderKeywords: _ALPHATEST_ON _DOUBLESIDED_ON
m_Shader: {fileID: 4800000, guid: 0ea49def0f338f3469b36324526446a9, type: 3}
m_ShaderKeywords: _ALBEDOAFFECTEMISSIVE_OFF _ALPHATEST_ON _DEPTHOFFSETENABLE_OFF
_DISTORTIONDEPTHTEST_OFF _DISTORTIONENABLE_OFF _DOUBLESIDED_ON _ENABLEFOGONTRANSPARENT_OFF
_ENABLEPERPIXELDISPLACEMENT_OFF _ENABLESPECULAROCCLUSION_OFF _ENABLEWIND_OFF _FABRIC_SILK
_HAIRSPRAYS_OFF _MASKMAP _MATID_SSS _NORMALMAP _NORMALMAP_TANGENT_SPACE _PREREFRACTIONPASS_OFF
m_CustomRenderQueue: 2450
stringTagMap:
RenderType: TransparentCutout
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses:
- DistortionVectors
m_SavedProperties:

m_Texture: {fileID: 2800000, guid: 00447c5eeb984f54d92c80818840a36b, 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: 2800000, guid: 0c3144d154991884c8aa53e7dc7893ff, type: 3}
m_Scale: {x: 1, y: 1}

m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DiffuseColorMap:
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_Texture: {fileID: 2800000, guid: 0c3144d154991884c8aa53e7dc7893ff, type: 3}
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_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_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}

m_Offset: {x: 0, y: 0}
- _TransmittanceColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _VegNoise:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _VegWindMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ATDistance: 1
- _AlbedoAffectEmissive: 0
- _AlphaCutoffOpacityThreshold: 0.99
- _AlphaCutoffPrepass: 0.5
- _AlphaCutoffShadow: 0.5
- _CharacterMaterialID: 0
- _CoatCoverage: 1
- _CoatIOR: 0.5
- _DetailFuzz1: 1
- _DisplacementLockObjectScale: 1
- _DisplacementLockTilingScale: 1
- _DisplacementMode: 0
- _DistortionBlendMode: 0
- _DistortionBlurBlendMode: 0
- _DistortionBlurDstBlend: 1

- _DistortionOnly: 0
- _DistortionScale: 1
- _DistortionSrcBlend: 1
- _DistortionVectorBias: -1
- _DistortionVectorScale: 2
- _DoubleSidedNormalMode: 1
- _Drag: 1
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableSpecularOcclusion: 0
- _EnableWind: 0
- _EyeIOR: 0.5
- _EyeIrisDepth: 0.5
- _EyeIrisRadius: 0.5
- _FabricType: 0
- _HairShadowStrength: 0.5
- _HairSpecularShift: 0.5
- _HairSprays: 0
- _HeightMax: 1
- _HeightMin: -1
- _IOR: 1
- _InitialBend: 1
- _InvTilingScale: 1
- _LinkDetailsWithBase: 1
- _MaterialID: 0
- _Metalic: 0
- _Metallic: 0

- _PPDLodThreshold: 5
- _PPDMaxSamples: 15
- _PPDMinSamples: 5
- _PPDPrimitiveLength: 1
- _PPDPrimitiveWidth: 1
- _RefractionMode: 0
- _ShiverDirectionality: 0.5
- _ShiverDrag: 0.2
- _SmoothnessRemapMax: 1
- _SmoothnessRemapMin: 0
- _Stiffness: 1
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1
- _SurfaceType: 0

- _TessellationShapeFactor: 0.75
- _TexWorldScale: 1
- _Thickness: 0.5
- _ThicknessMultiplier: 1
- _TransparentDepthPrepassEnable: 1
- _TransparentDepthWritePrepassEnable: 1
- _VegDetailVariation: 1
- _VegLeafShakePower: 1
- _VegLeafShakeScale: 1
- _VegLeafShakeSpeed: 1
- _VegPerLeafBendPower: 1
- _VegPerLeafBendScale: 1
- _VegPerLeafBendSpeed: 1
- _VegStiffness: 1
- _VegWindIntensity: 1
- _VegWindSpeed: 1
- _DoubleSidedConstants: {r: -1, g: -1, b: -1, a: 0}
- _DiffuseColor: {r: 1, g: 1, b: 1, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EyeLookVector: {r: 0, g: 0, b: 1, a: 1}
- _FuzzTint: {r: 1, g: 1, b: 1, a: 1}
- _HairSpecularHighlight: {r: 1, g: 1, b: 1, a: 1}
- _InvPrimScale: {r: 1, g: 1, b: 0, a: 0}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
- _VegAssistantDirectional: {r: 0, g: 0, b: 0, a: 0}
- _VegPivot: {r: 0, g: 0, b: 0, a: 0}
- _VegWindDirection: {r: 0, g: 0, b: 0, a: 0}

60
SampleScenes/HDTest/GraphicTest/Two Sided/Material/GroundLeaf_DoubleSidedMirror.mat


m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: GroundLeaf_DoubleSidedMirror
m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}
m_ShaderKeywords: _ALPHATEST_ON _BLENDMODE_PRESERVE_SPECULAR_LIGHTING _MASKMAP _NORMALMAP
_NORMALMAP_TANGENT_SPACE
m_Shader: {fileID: 4800000, guid: ff1b756ebf5550048bed17a617e8f5b0, type: 3}
m_ShaderKeywords: _ALBEDOAFFECTEMISSIVE_OFF _ALPHATEST_ON _BLENDMODE_PRESERVE_SPECULAR_LIGHTING
_DEPTHOFFSETENABLE_OFF _DISTORTIONDEPTHTEST_OFF _DISTORTIONENABLE_OFF _DOUBLESIDEDENABLE_OFF
_ENABLESPECULAROCCLUSION_OFF _ENABLEWIND_OFF _HAIRSPRAYS_OFF _MASKMAP _NORMALMAP
_NORMALMAP_TANGENT_SPACE _PREREFRACTIONPASS_OFF
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 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}
- _DiffuseColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}

m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TransmittanceColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _VegNoise:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _VegWindMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _AORemapMax: 1
- _AORemapMin: 0
- _AlphaCutoffPrepass: 0.5
- _AlphaCutoffShadow: 0.5
- _CharacterMaterialID: 0
- _CoatCoverage: 1
- _CoatIOR: 0.5
- _CullMode: 2

- _DistortionOnly: 0
- _DistortionScale: 1
- _DistortionSrcBlend: 1
- _DistortionVectorBias: -1
- _DistortionVectorScale: 2
- _DoubleSidedEnable: 0
- _DoubleSidedMirrorEnable: 1
- _DoubleSidedMode: 3

- _EnablePerPixelDisplacement: 0
- _EnableSpecularOcclusion: 0
- _EnableWind: 0
- _EyeIOR: 0.5
- _EyeIrisDepth: 0.5
- _EyeIrisRadius: 0.5
- _HairSprays: 0
- _HeightAmplitude: 0.32
- _HeightBias: 0
- _HeightCenter: 0.68

- _PPDPrimitiveWidth: 1
- _Parallax: 0.02
- _PreRefractionPass: 0
- _PrimarySpecular: 0.8
- _PrimarySpecularShift: 0
- _Scatter: 0.7
- _SecondarySpecular: 0.5
- _SecondarySpecularShift: 0
- _ShiverDirectionality: 0.5
- _ShiverDrag: 0.2
- _Smoothness: 0.5

- _TexWorldScale: 1
- _Thickness: 1
- _ThicknessMultiplier: 1
- _TransparentDepthPrepassEnable: 1
- _VegDetailVariation: 1
- _VegLeafShakePower: 1
- _VegLeafShakeScale: 1
- _VegLeafShakeSpeed: 1
- _VegPerLeafBendPower: 1
- _VegPerLeafBendScale: 1
- _VegPerLeafBendSpeed: 1
- _VegStiffness: 1
- _VegWindIntensity: 1
- _VegWindSpeed: 1
- _Color: {r: 0.5882353, g: 0.5882353, b: 0.5882353, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DiffuseColor: {r: 1, g: 1, b: 1, a: 1}
- _EyeLookVector: {r: 0, g: 0, b: 1, a: 1}
- _SpecularTint: {r: 1, g: 1, b: 1, a: 1}
- _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _VegAssistantDirectional: {r: 0, g: 0, b: 0, a: 0}
- _VegPivot: {r: 0, g: 0, b: 0, a: 0}
- _VegWindDirection: {r: 0, g: 0, b: 0, a: 0}

20
ScriptableRenderPipeline/HDRenderPipeline/Material/Character/Character.shader


_DiffuseColor("DiffuseColor", Color) = (1, 1, 1, 1)
_DiffuseColorMap("DiffuseColorMap", 2D) = "white" {}
[HideInInspector] _BlendMode("__blendmode", Float) = 0.0
[HideInInspector] _SrcBlend("__src", Float) = 1.0
[HideInInspector] _DstBlend("__dst", Float) = 0.0

//Skin
//Hair
[ToggleOff] _HairSprays("Hair Sprays", Float) = 0.0
_HairSpecularShift("SpecularShift", Range(0, 1)) = 0.5

//---------------------------------
//Include
//---------------------------------
#include "../../../ShaderLibrary/Common.hlsl"
#include "../../../ShaderLibrary/Wind.hlsl"
#include "../../../Core/ShaderLibrary/Common.hlsl"
#include "../../../Core/ShaderLibrary/Wind.hlsl"
#include "../../ShaderConfig.cs.hlsl"
#include "../../ShaderVariables.hlsl"
#include "../../ShaderPass/FragInputs.hlsl"

ENDHLSL
SubShader{
Pass{
Name "ShadowCaster"
Tags { "LightMode"="ShadowCaster" }

ZWrite On
HLSLPROGRAM
#define SHADERPASS SHADERPASS_DEPTH_ONLY
#include "../../Material/Material.hlsl"
#include "ShaderPass/CharacterDepthPass.hlsl"

ENDHLSL
}
}
}

17
ScriptableRenderPipeline/HDRenderPipeline/Material/Character/CharacterData.hlsl


#include "ShaderLibrary/SampleUVMapping.hlsl"
#include "../../../Core/ShaderLibrary/SampleUVMapping.hlsl"
#include "../MaterialUtilities.hlsl"
void GetBuiltinData(FragInputs input, SurfaceData surfaceData, float alpha, float depthOffset, out BuiltinData builtinData)

// This should also handle projective lightmap
// Note that data input above can be use to sample into lightmap (like normal)
builtinData.bakeDiffuseLighting = SampleBakedGI(input.positionWS, surfaceData.normalWS, input.texCoord1, input.texCoord2);
#ifdef SHADOWS_SHADOWMASK
float4 shadowMask = SampleShadowMask(input.positionWS, input.texCoord1);
builtinData.shadowMask0 = shadowMask.x;
builtinData.shadowMask1 = shadowMask.y;
builtinData.shadowMask2 = shadowMask.z;
builtinData.shadowMask3 = shadowMask.w;
#else
builtinData.shadowMask0 = 0.0;
builtinData.shadowMask1 = 0.0;
builtinData.shadowMask2 = 0.0;
builtinData.shadowMask3 = 0.0;
#endif
// Emissive Intensity is only use here, but is part of BuiltinData to enforce UI parameters as we want the users to fill one color and one intensity
builtinData.emissiveIntensity = _EmissiveIntensity; // We still store intensity here so we can reuse it with debug code

// Caution: surfaceData must be fully initialize before calling GetBuiltinData
GetBuiltinData(input, surfaceData, alpha, depthOffset, builtinData);
}
}

15
ScriptableRenderPipeline/HDRenderPipeline/Material/Eye/EyeData.hlsl


builtinData.bakeDiffuseLighting += SampleBakedGI(input.positionWS, -input.worldToTangent[2], input.texCoord1, input.texCoord2) * bsdfData.transmittance;
}
#ifdef SHADOWS_SHADOWMASK
float4 shadowMask = SampleShadowMask(input.positionWS, input.texCoord1);
builtinData.shadowMask0 = shadowMask.x;
builtinData.shadowMask1 = shadowMask.y;
builtinData.shadowMask2 = shadowMask.z;
builtinData.shadowMask3 = shadowMask.w;
#else
builtinData.shadowMask0 = 0.0;
builtinData.shadowMask1 = 0.0;
builtinData.shadowMask2 = 0.0;
builtinData.shadowMask3 = 0.0;
#endif
// Emissive Intensity is only use here, but is part of BuiltinData to enforce UI parameters as we want the users to fill one color and one intensity
builtinData.emissiveIntensity = _EmissiveIntensity; // We still store intensity here so we can reuse it with debug code

//Windup Eyes
//-------------------------------------------------
EyeParallax(input.texCoord0, input.worldToTangent[2].xyz, V);
EyeParallax(input.texCoord0, input.worldToTangent[2].xyz, V);
//-------------------------------------------------
LayerTexCoord layerTexCoord;

13
ScriptableRenderPipeline/HDRenderPipeline/Material/Fabric/FabricData.hlsl


builtinData.bakeDiffuseLighting += SampleBakedGI(input.positionWS, -input.worldToTangent[2], input.texCoord1, input.texCoord2) * bsdfData.transmittance;
}
#ifdef SHADOWS_SHADOWMASK
float4 shadowMask = SampleShadowMask(input.positionWS, input.texCoord1);
builtinData.shadowMask0 = shadowMask.x;
builtinData.shadowMask1 = shadowMask.y;
builtinData.shadowMask2 = shadowMask.z;
builtinData.shadowMask3 = shadowMask.w;
#else
builtinData.shadowMask0 = 0.0;
builtinData.shadowMask1 = 0.0;
builtinData.shadowMask2 = 0.0;
builtinData.shadowMask3 = 0.0;
#endif
// Emissive Intensity is only use here, but is part of BuiltinData to enforce UI parameters as we want the users to fill one color and one intensity
builtinData.emissiveIntensity = _EmissiveIntensity; // We still store intensity here so we can reuse it with debug code

13
ScriptableRenderPipeline/HDRenderPipeline/Material/Hair/HairData.hlsl


// Note that data input above can be use to sample into lightmap (like normal)
builtinData.bakeDiffuseLighting = SampleBakedGI(input.positionWS, surfaceData.normalWS, input.texCoord1, input.texCoord2);
#ifdef SHADOWS_SHADOWMASK
float4 shadowMask = SampleShadowMask(input.positionWS, input.texCoord1);
builtinData.shadowMask0 = shadowMask.x;
builtinData.shadowMask1 = shadowMask.y;
builtinData.shadowMask2 = shadowMask.z;
builtinData.shadowMask3 = shadowMask.w;
#else
builtinData.shadowMask0 = 0.0;
builtinData.shadowMask1 = 0.0;
builtinData.shadowMask2 = 0.0;
builtinData.shadowMask3 = 0.0;
#endif
// Emissive Intensity is only use here, but is part of BuiltinData to enforce UI parameters as we want the users to fill one color and one intensity
builtinData.emissiveIntensity = _EmissiveIntensity; // We still store intensity here so we can reuse it with debug code

13
ScriptableRenderPipeline/HDRenderPipeline/Material/Vegetation/VegetationData.hlsl


builtinData.bakeDiffuseLighting += SampleBakedGI(input.positionWS, -input.worldToTangent[2], input.texCoord1, input.texCoord2) * bsdfData.transmittance;
}
#ifdef SHADOWS_SHADOWMASK
float4 shadowMask = SampleShadowMask(input.positionWS, input.texCoord1);
builtinData.shadowMask0 = shadowMask.x;
builtinData.shadowMask1 = shadowMask.y;
builtinData.shadowMask2 = shadowMask.z;
builtinData.shadowMask3 = shadowMask.w;
#else
builtinData.shadowMask0 = 0.0;
builtinData.shadowMask1 = 0.0;
builtinData.shadowMask2 = 0.0;
builtinData.shadowMask3 = 0.0;
#endif
// Emissive Intensity is only use here, but is part of BuiltinData to enforce UI parameters as we want the users to fill one color and one intensity
builtinData.emissiveIntensity = _EmissiveIntensity; // We still store intensity here so we can reuse it with debug code

正在加载...
取消
保存