| Package | laya.d3.core.material |
| Class | public class PBRMaterial |
| Inheritance | PBRMaterial BaseMaterial laya.resource.Resource |
| Property | Defined By | ||
|---|---|---|---|
![]() | alphaTest : Boolean
获取是否透明裁剪。
| BaseMaterial | |
![]() | alphaTestValue : Number
获取透明测试模式裁剪值。
| BaseMaterial | |
![]() | blend : int 透明混合。 | BaseMaterial | |
![]() | blendConstColor : Vector4 混合常量颜色。 | BaseMaterial | |
![]() | blendEquation : int 混合方程。 | BaseMaterial | |
![]() | blendEquationAlpha : int Alpha混合方程。 | BaseMaterial | |
![]() | blendEquationRGB : int RGB混合方程。 | BaseMaterial | |
![]() | cull : int 渲染剔除。 | BaseMaterial | |
![]() | depthFunc : int 深度测试函数。 | BaseMaterial | |
![]() | depthTest : Boolean 是否深度测试。 | BaseMaterial | |
![]() | depthWrite : Boolean 是否深度写入。 | BaseMaterial | |
| diffuseTexture : BaseTexture
获取漫反射贴图。
| PBRMaterial | ||
![]() | dstBlend : int 目标混合参数,在blend为BLEND_ENABLE_ALL时生效。 | BaseMaterial | |
![]() | dstBlendAlpha : int Alpha目标混合参数,在blend为BLEND_ENABLE_SEPERATE时生效。 | BaseMaterial | |
![]() | dstBlendRGB : int RGB目标混合参数,在blend为BLEND_ENABLE_SEPERATE时生效。 | BaseMaterial | |
| HammersleyNoiseTex : DataTexture2D [static] | PBRMaterial | ||
| has_tangent : Boolean [write-only] | PBRMaterial | ||
| metaless : Number | PBRMaterial | ||
| normalTexture : BaseTexture
获取法线贴图。
| PBRMaterial | ||
| pbrInfoTexture : BaseTexture
获取pbr信息贴图。
| PBRMaterial | ||
| pbrlutTex : DataTexture2D [static] | PBRMaterial | ||
| pbrlutTexture : BaseTexture
获取PBRLUT贴图。
| PBRMaterial | ||
| renderMode : int [write-only] | PBRMaterial | ||
![]() | renderQueue : int 所属渲染队列. | BaseMaterial | |
| roughness : Number
获取粗糙度的值,0为特别光滑,1为特别粗糙。
| PBRMaterial | ||
| SHADERDEFINE_FIX_METALESS : int = 0 [static] | PBRMaterial | ||
| SHADERDEFINE_FIX_ROUGHNESS : int = 0 [static] | PBRMaterial | ||
| SHADERDEFINE_HAS_PBRINFO : int = 0 [static] | PBRMaterial | ||
| SHADERDEFINE_HAS_TANGENT : int = 0 [static] | PBRMaterial | ||
| SHADERDEFINE_TEST_CLIPZ : int = 0 [static] | PBRMaterial | ||
| SHADERDEFINE_USE_GROUNDTRUTH : int = 0 [static] | PBRMaterial | ||
![]() | srcBlend : int 源混合参数,在blend为BLEND_ENABLE_ALL时生效。 | BaseMaterial | |
![]() | srcBlendAlpha : int Alpha源混合参数,在blend为BLEND_ENABLE_SEPERATE时生效。 | BaseMaterial | |
![]() | srcBlendRGB : int RGB源混合参数,在blend为BLEND_ENABLE_SEPERATE时生效。 | BaseMaterial | |
| testClipZ : Boolean [write-only] | PBRMaterial | ||
| transformUV : TransformUV
获取UV变换。
| PBRMaterial | ||
| use_groundtruth : Boolean [write-only] | PBRMaterial | ||
| Method | Defined By | ||
|---|---|---|---|
| PBRMaterial | |||
![]() | _setRenderStateBlendDepth():void
设置渲染相关状态。
| BaseMaterial | |
![]() | _setRenderStateFrontFace(isTarget:Boolean, transform:Transform3D):void
设置渲染相关状态。
| BaseMaterial | |
![]() | _upload():void
上传材质。
| BaseMaterial | |
![]() | clone():*
克隆。
| BaseMaterial | |
![]() | cloneTo(destObject:*):void
克隆。
| BaseMaterial | |
createHammersleyTex(w:int, h:int):Uint8Array | PBRMaterial | ||
disableFog():void
禁用雾化。
| PBRMaterial | ||
disableLight():void
禁用灯光。
| PBRMaterial | ||
load(url:String):PBRMaterial [static]
加载标准材质。
| PBRMaterial | ||
onAsynLoaded(url:String, data:*, params:Array):void [override] | PBRMaterial | ||
radicalInverse_VdC(bits:int):Number
vdc算法产生的序列。这个比random要均匀一些。
| PBRMaterial | ||
![]() | setShaderName(name:String):void
设置使用Shader名字。
| BaseMaterial | |
| Constant | Defined By | ||
|---|---|---|---|
| AOOBJPOS : int = 14 [static] | PBRMaterial | ||
![]() | BLEND_DISABLE : int = 0 [static] 混合枚举_禁用。 | BaseMaterial | |
![]() | BLEND_ENABLE_ALL : int = 1 [static] 混合枚举_启用_RGB和Alpha统一混合。 | BaseMaterial | |
![]() | BLEND_ENABLE_SEPERATE : int = 2 [static] 混合枚举_启用_RGB和Alpha单独混合。 | BaseMaterial | |
![]() | BLENDEQUATION_ADD : int = 0 [static] 混合方程枚举_加法,例:source + destination | BaseMaterial | |
![]() | BLENDEQUATION_REVERSE_SUBTRACT : int = 2 [static] 混合方程枚举_反序减法,例:destination - source | BaseMaterial | |
![]() | BLENDEQUATION_SUBTRACT : int = 1 [static] 混合方程枚举_减法,例:source - destination | BaseMaterial | |
![]() | BLENDPARAM_CONSTANT_ALPHA : int = 0x8003 [static] 混合参数枚举_常量阿尔法,例:RGB(Ac, Ac, Ac),Alpha(Ac)。 | BaseMaterial | |
![]() | BLENDPARAM_CONSTANT_COLOR : int = 0x8001 [static] 混合参数枚举_常量颜色,例:RGB(Rc, Gc, Bc),Alpha(Ac)。 | BaseMaterial | |
![]() | BLENDPARAM_DST_ALPHA : int = 0x0304 [static] 混合参数枚举_目标阿尔法,例:RGB(Ad, Ad, Ad),Alpha(Ad)。 | BaseMaterial | |
![]() | BLENDPARAM_DST_COLOR : int = 0x0306 [static] 混合参数枚举_目标颜色,例:RGB(Rd, Gd, Bd),Alpha(Ad)。 | BaseMaterial | |
![]() | BLENDPARAM_ONE : int = 1 [static] 混合参数枚举_一,例:RGB(1,1,1),Alpha:(1)。 | BaseMaterial | |
![]() | BLENDPARAM_ONE_MINUS_CONSTANT_ALPHA : int = 0x8004 [static] 混合参数枚举_一减常量阿尔法,例:RGB(1-Ac, 1-Ac, 1-Ac),Alpha(1-Ac)。 | BaseMaterial | |
![]() | BLENDPARAM_ONE_MINUS_CONSTANT_COLOR : int = 0x8002 [static] 混合参数枚举_一减常量颜色,例:RGB(1-Rc, 1-Gc, 1-Bc),Alpha(1-Ac)。 | BaseMaterial | |
![]() | BLENDPARAM_ONE_MINUS_DST_ALPHA : int = 0x0305 [static] 混合参数枚举_一减目标阿尔法,例:RGB(1-Ad, 1-Ad, 1-Ad),Alpha(Ad)。 | BaseMaterial | |
![]() | BLENDPARAM_ONE_MINUS_DST_COLOR : int = 0x0307 [static] 混合参数枚举_一减目标颜色,例:RGB(1-Rd, 1-Gd, 1-Bd),Alpha(1-Ad)。 | BaseMaterial | |
![]() | BLENDPARAM_ONE_MINUS_SRC_ALPHA : int = 0x0303 [static] 混合参数枚举_一减源阿尔法,例:RGB(1-As, 1-As, 1-As),Alpha(1-As)。 | BaseMaterial | |
![]() | BLENDPARAM_ONE_MINUS_SRC_COLOR : int = 0x0301 [static] 混合参数枚举_一减源颜色,例:RGB(1-Rs, 1-Gs, 1-Bs),Alpha(1-As)。 | BaseMaterial | |
![]() | BLENDPARAM_SRC_ALPHA : int = 0x0302 [static] 混合参数枚举_源透明,例:RGB(As, As, As),Alpha(1-As)。 | BaseMaterial | |
![]() | BLENDPARAM_SRC_ALPHA_SATURATE : int = 0x0308 [static] 混合参数枚举_阿尔法饱和,例:RGB(min(As, 1 - Ad), min(As, 1 - Ad), min(As, 1 - Ad)),Alpha(1)。 | BaseMaterial | |
![]() | BLENDPARAM_SRC_COLOR : int = 0x0300 [static] 混合参数枚举_源颜色,例:RGB(Rs, Gs, Bs),Alpha(As)。 | BaseMaterial | |
![]() | BLENDPARAM_ZERO : int = 0 [static] 混合参数枚举_零,例:RGB(0,0,0),Alpha:(1)。 | BaseMaterial | |
![]() | CULL_BACK : int = 2 [static] 剔除枚举_剔除背面。 | BaseMaterial | |
![]() | CULL_FRONT : int = 1 [static] 剔除枚举_剔除正面。 | BaseMaterial | |
![]() | CULL_NONE : int = 0 [static] 剔除枚举_不剔除。 | BaseMaterial | |
| defaultMaterial : PBRMaterial [static] 默认材质,禁止修改 | PBRMaterial | ||
![]() | DEPTHFUNC_ALWAYS : int = 0x0207 [static] 深度测试函数枚举_总是通过。 | BaseMaterial | |
![]() | DEPTHFUNC_EQUAL : int = 0x0202 [static] 深度测试函数枚举_等于时通过。 | BaseMaterial | |
![]() | DEPTHFUNC_GEQUAL : int = 0x0206 [static] 深度测试函数枚举_大于等于时通过。 | BaseMaterial | |
![]() | DEPTHFUNC_GREATER : int = 0x0204 [static] 深度测试函数枚举_大于时通过。 | BaseMaterial | |
![]() | DEPTHFUNC_LEQUAL : int = 0x0203 [static] 深度测试函数枚举_小于等于时通过。 | BaseMaterial | |
![]() | DEPTHFUNC_LESS : int = 0x0201 [static] 深度测试函数枚举_小于时通过。 | BaseMaterial | |
![]() | DEPTHFUNC_NEVER : int = 0x0200 [static] 深度测试函数枚举_从不通过。 | BaseMaterial | |
![]() | DEPTHFUNC_NOTEQUAL : int = 0x0205 [static] 深度测试函数枚举_不等于时通过。 | BaseMaterial | |
| DIFFUSETEXTURE : int = 1 [static] | PBRMaterial | ||
| HSNOISETEXTURE : int = 15 [static] | PBRMaterial | ||
| MATERIALMETALESS : int = 7 [static] | PBRMaterial | ||
| MATERIALROUGHNESS : int = 6 [static] | PBRMaterial | ||
| NORMALTEXTURE : int = 2 [static] | PBRMaterial | ||
| PBRINFOTEXTURE : int = 3 [static] | PBRMaterial | ||
| PBRLUTTEXTURE : int = 4 [static] | PBRMaterial | ||
| RENDERMODE_CUTOUT : int = 3 [static] 渲染状态_透明测试。 | PBRMaterial | ||
| RENDERMODE_CUTOUTDOUBLEFACE : int = 4 [static] 渲染状态_透明测试_双面。 | PBRMaterial | ||
| RENDERMODE_OPAQUE : int = 1 [static] 渲染状态_不透明。 | PBRMaterial | ||
| RENDERMODE_OPAQUEDOUBLEFACE : int = 2 [static] 渲染状态_不透明_双面。 | PBRMaterial | ||
| RENDERMODE_TRANSPARENT : int = 13 [static] 渲染状态_透明混合。 | PBRMaterial | ||
| UVAGE : int = 9 [static] | PBRMaterial | ||
| UVANIAGE : int = 5 [static] | PBRMaterial | ||
| UVMATRIX : int = 8 [static] | PBRMaterial | ||
| diffuseTexture | property |
diffuseTexture:BaseTexture获取漫反射贴图。
public function get diffuseTexture():BaseTexture public function set diffuseTexture(value:BaseTexture):void| HammersleyNoiseTex | property |
public static var HammersleyNoiseTex:DataTexture2D| has_tangent | property |
has_tangent:Boolean [write-only] public function set has_tangent(value:Boolean):void| metaless | property |
metaless:Number public function get metaless():Number public function set metaless(value:Number):void| normalTexture | property |
normalTexture:BaseTexture获取法线贴图。
public function get normalTexture():BaseTexture public function set normalTexture(value:BaseTexture):void| pbrInfoTexture | property |
pbrInfoTexture:BaseTexture获取pbr信息贴图。
public function get pbrInfoTexture():BaseTexture public function set pbrInfoTexture(value:BaseTexture):void| pbrlutTex | property |
public static var pbrlutTex:DataTexture2D| pbrlutTexture | property |
pbrlutTexture:BaseTexture获取PBRLUT贴图。
public function get pbrlutTexture():BaseTexture public function set pbrlutTexture(value:BaseTexture):void| renderMode | property |
renderMode:int [write-only] public function set renderMode(value:int):void| roughness | property |
roughness:Number获取粗糙度的值,0为特别光滑,1为特别粗糙。
public function get roughness():Number public function set roughness(value:Number):void| SHADERDEFINE_FIX_METALESS | property |
public static var SHADERDEFINE_FIX_METALESS:int = 0| SHADERDEFINE_FIX_ROUGHNESS | property |
public static var SHADERDEFINE_FIX_ROUGHNESS:int = 0| SHADERDEFINE_HAS_PBRINFO | property |
public static var SHADERDEFINE_HAS_PBRINFO:int = 0| SHADERDEFINE_HAS_TANGENT | property |
public static var SHADERDEFINE_HAS_TANGENT:int = 0| SHADERDEFINE_TEST_CLIPZ | property |
public static var SHADERDEFINE_TEST_CLIPZ:int = 0| SHADERDEFINE_USE_GROUNDTRUTH | property |
public static var SHADERDEFINE_USE_GROUNDTRUTH:int = 0| testClipZ | property |
testClipZ:Boolean [write-only] public function set testClipZ(value:Boolean):void| transformUV | property |
transformUV:TransformUV获取UV变换。
public function get transformUV():TransformUV public function set transformUV(value:TransformUV):void| use_groundtruth | property |
use_groundtruth:Boolean [write-only] public function set use_groundtruth(value:Boolean):void| PBRMaterial | () | Constructor |
public function PBRMaterial()| createHammersleyTex | () | method |
public function createHammersleyTex(w:int, h:int):Uint8Array
Parameters
w:int | |
h:int |
Uint8Array |
| disableFog | () | method |
public function disableFog():void禁用雾化。
| disableLight | () | method |
public function disableLight():void禁用灯光。
| load | () | method |
public static function load(url:String):PBRMaterial加载标准材质。
Parameters
url:String — 标准材质地址。
|
PBRMaterial |
| onAsynLoaded | () | method |
override public function onAsynLoaded(url:String, data:*, params:Array):voidParameters
url:String | |
data:* | |
params:Array |
| radicalInverse_VdC | () | method |
public function radicalInverse_VdC(bits:int):Numbervdc算法产生的序列。这个比random要均匀一些。
Parameters
bits:int |
Number |
| AOOBJPOS | Constant |
public static const AOOBJPOS:int = 14| defaultMaterial | Constant |
public static const defaultMaterial:PBRMaterial默认材质,禁止修改
| DIFFUSETEXTURE | Constant |
public static const DIFFUSETEXTURE:int = 1| HSNOISETEXTURE | Constant |
public static const HSNOISETEXTURE:int = 15| MATERIALMETALESS | Constant |
public static const MATERIALMETALESS:int = 7| MATERIALROUGHNESS | Constant |
public static const MATERIALROUGHNESS:int = 6| NORMALTEXTURE | Constant |
public static const NORMALTEXTURE:int = 2| PBRINFOTEXTURE | Constant |
public static const PBRINFOTEXTURE:int = 3| PBRLUTTEXTURE | Constant |
public static const PBRLUTTEXTURE:int = 4| RENDERMODE_CUTOUT | Constant |
public static const RENDERMODE_CUTOUT:int = 3渲染状态_透明测试。
| RENDERMODE_CUTOUTDOUBLEFACE | Constant |
public static const RENDERMODE_CUTOUTDOUBLEFACE:int = 4渲染状态_透明测试_双面。
| RENDERMODE_OPAQUE | Constant |
public static const RENDERMODE_OPAQUE:int = 1渲染状态_不透明。
| RENDERMODE_OPAQUEDOUBLEFACE | Constant |
public static const RENDERMODE_OPAQUEDOUBLEFACE:int = 2渲染状态_不透明_双面。
| RENDERMODE_TRANSPARENT | Constant |
public static const RENDERMODE_TRANSPARENT:int = 13渲染状态_透明混合。
| UVAGE | Constant |
public static const UVAGE:int = 9| UVANIAGE | Constant |
public static const UVANIAGE:int = 5| UVMATRIX | Constant |
public static const UVMATRIX:int = 8