您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
34 行
970 B
34 行
970 B
#ifndef UNIVERSAL_BAKEDLIT_META_PASS_INCLUDED
|
|
#define UNIVERSAL_BAKEDLIT_META_PASS_INCLUDED
|
|
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/MetaInput.hlsl"
|
|
|
|
Varyings UniversalVertexMeta(Attributes input)
|
|
{
|
|
Varyings output;
|
|
output.positionCS = MetaVertexPosition(input.positionOS, input.uv1, input.uv2,
|
|
unity_LightmapST, unity_DynamicLightmapST);
|
|
output.uv = TRANSFORM_TEX(input.uv0, _BaseMap);
|
|
return output;
|
|
}
|
|
|
|
half4 UniversalFragmentMetaBakedLit(Varyings input) : SV_Target
|
|
{
|
|
MetaInput metaInput = (MetaInput)0;
|
|
metaInput.Albedo = _BaseColor.rgb * SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, input.uv).rgb;
|
|
|
|
return MetaFragment(metaInput);
|
|
}
|
|
|
|
//LWRP -> Universal Backwards Compatibility
|
|
Varyings LightweightVertexMeta(Attributes input)
|
|
{
|
|
return UniversalVertexMeta(input);
|
|
}
|
|
|
|
half4 LightweightFragmentMetaBakedLit(Varyings input) : SV_Target
|
|
{
|
|
return LightweightFragmentMetaBakedLit(input);
|
|
}
|
|
|
|
#endif
|