LitPassFragment
2020-12-14 11:41:42 8 举报
Unity URP Lit shader fragment 逻辑
作者其他创作
大纲/内容
LightingPhysicallyBased(mainLight)
viewDirWS
color
lightmapUV
.a
smoothness
fogCoord
vertexSH
specularTerm
_Smoothness_SpecColor_Metallic
InitializeStandardLitSurfaceData
Property
fogFactorAndVertexLight.yzw
_BumpMap
特殊修改
reflectionVector
viewDirectionWS
InitializeBRDFData
metallic
potisionWS
LightweightFragmentPBR
SampleSHPixel
unity_SpecCube0unity_SpecCube0_HDR
Light mainLight
indirectDiffuse
_SPECULAR_SETUP
VertexLighting
GetMainLight
alpha
light.colorlight.directionlight.distanceAttenuationlight.shadowAttenuation
TransformTangentToWorld
normalTS
_EmissionColor
specGloss
需要扩展(基本不影响外部)
surfaceReduction
positionWS
Light light.direction = _MainLightPosition.xyz.distanceAttenuation = unity_LightData.z(*unity_ProbesOcclusion.x) (LIGHTMAP_ON)color = _MainLightColor.rgb
SurfaceData surfaceData
SampleAlbedoAlpha
occlusion
fresnelterm
.rgb
GlobalIllumination
perceptualRoughness
_NORMALMAP
EnvironmentBRDF
roughness2MinusOne
_EmissionMap
emission
shadowCoord
MixRealtimeAndBakedGI
SAMPLE_GI
_OcclusionMap
roughness2
SampleMetallicSpecGloss
normalWS.wtangentWS.wbitangentWS.w
roughness
GetAdditionalLight
specular
indirectSpecular
_BaseMap
MixFog
SampleLightMap
tangentWS.xyzbitangentWS.xyznormalWS.xyz
bakedGI
_BaseColor
c
DirectBRDF(LightingPhysicallyBased)
.r
grazingTerm
需判定算法的函数或者参数
SampleOcclusion
1.0
_BumpScale
albedoAlpha
SampleEmission
_Cutoff
Varyings input
diffuse
Alpha
_MainLightPosition.xyzunity_LightData.zunity_ProbesOcclusion.x
GlossyEnvironmentReflection
Texture2D _BumpMap;Texture2D _BaseMap;Texture2D _OcclusionMap;Texture2D _EmissionMap;float4 _BaseMap_ST;half4 _BaseColor;half4 _SpecColor;half4 _EmissionColor;half _Cutoff;half _Smoothness;half _Metallic;half _BumpScale;half _OcclusionStrength;
fogFactorAndVertexLight.x
LightingPhysicallyBased(AdditionalLights)
albedo
SampleNormal
InitializeInputData
BRDFData brdfData
normalWS
_OcclusionStrength
InputDatainputData
uv
normalizationTerm
收藏
0 条评论
下一页
为你推荐
查看更多
抱歉,暂无相关内容