您的位置:首页 > 移动开发 > Unity3D

Unity build-in shader 阅读-------HLSLSupporting.cginc

2017-09-18 19:22 399 查看
Texture2D sampler2D https://docs.unity3d.com/Manual/SL-SamplerStates.html

tex.SampleCmpLevelZero (sampler##tex,(coord).xy,(coord).z)

HLSLSupport.cginc 261

#define UNITY_SAMPLE_SHADOW(tex,coord) tex.SampleCmpLevelZero (sampler##tex,(coord).xy,(coord).z)

#define UNITY_SAMPLE_SHADOW_PROJ(tex,coord) tex.SampleCmpLevelZero (sampler##tex,(coord).xy/(coord).w,(coord).z/(coord).w)

sampler2DShadow

shadow2D

shadow2Dproj

sampler2D_float

tex2D

tex2Dproj

tex2Dlod

tex2Dbias

sampler2DArray

tex2DArray

texCUBElod

samplers & textures 在DX11是分开使用,

SamplerState

SGX interpolators
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  unity shader