您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
78 行
2.0 KiB
78 行
2.0 KiB
// ===========================================================================
|
|
// WARNING:
|
|
// On PS4, texture/sampler declarations need to be outside of CBuffers
|
|
// Otherwise those parameters are not bound correctly at runtime.
|
|
// ===========================================================================
|
|
TEXTURE2D(_DistortionVectorMap);
|
|
SAMPLER(sampler_DistortionVectorMap);
|
|
|
|
TEXTURE2D(_BaseColorMap);
|
|
SAMPLER(sampler_BaseColorMap);
|
|
|
|
TEXTURE2D(_MetallicMap);
|
|
SAMPLER(sampler_MetallicMap);
|
|
|
|
TEXTURE2D(_SmoothnessAMap);
|
|
SAMPLER(sampler_SmoothnessAMap);
|
|
|
|
TEXTURE2D(_SmoothnessBMap);
|
|
SAMPLER(sampler_SmoothnessBMap);
|
|
|
|
TEXTURE2D(_EmissiveColorMap);
|
|
SAMPLER(sampler_EmissiveColorMap);
|
|
|
|
TEXTURE2D(_NormalMap);
|
|
SAMPLER(sampler_NormalMap);
|
|
|
|
|
|
CBUFFER_START(UnityPerMaterial)
|
|
|
|
float4 _BaseColor;
|
|
float4 _BaseColorMap_ST;
|
|
float4 _BaseColorMap_TexelSize;
|
|
float4 _BaseColorMap_MipInfo;
|
|
float _BaseColorMapUV;
|
|
|
|
float _Metallic;
|
|
float _MetallicMapUV;
|
|
float4 _MetallicMapChannel;
|
|
|
|
float _SmoothnessA;
|
|
float _SmoothnessAMapUV;
|
|
float4 _SmoothnessAMapChannel;
|
|
float4 _SmoothnessARemap;
|
|
float _SmoothnessB;
|
|
float _SmoothnessBUV;
|
|
float4 _SmoothnessBMapChannel;
|
|
float4 _SmoothnessBRemap;
|
|
float _LobeMix;
|
|
|
|
float _NormalScale;
|
|
float _NormalMapUV;
|
|
|
|
float4 _UVMappingMask;
|
|
|
|
|
|
float3 _EmissiveColor;
|
|
float4 _EmissiveColorMap_ST;
|
|
float _EmissiveIntensity;
|
|
float _AlbedoAffectEmissive;
|
|
|
|
float _AlphaCutoff;
|
|
float4 _DoubleSidedConstants;
|
|
|
|
float _DistortionScale;
|
|
float _DistortionVectorScale;
|
|
float _DistortionVectorBias;
|
|
float _DistortionBlurScale;
|
|
float _DistortionBlurRemapMin;
|
|
float _DistortionBlurRemapMax;
|
|
|
|
|
|
// 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.
|
|
// In our case we don't use such a mechanism but need to keep the code quiet. We declare the value and always enable it.
|
|
// TODO: Fix the code in legacy unity so we can customize the behavior for GI
|
|
float3 _EmissionColor;
|
|
|
|
CBUFFER_END
|