Packagelaya.webgl.shader.d2
Classpublic class Shader2X
InheritanceShader2X Inheritance Shader Inheritance BaseShader Inheritance laya.resource.Resource



Public Properties
 PropertyDefined By
 InheritedactiveShader : BaseShader
[static]
BaseShader
 InheritedbindShader : BaseShader
[static]
BaseShader
 Inherited_id : int
Shader
 InheritednameKey : StringKey
[static]
Shader
 Inherited_offset : int = 0
Shader
 Inherited_params : Array = null
Shader
  _params2dQuick1 : Array = null
Shader2X
  _params2dQuick2 : Array = null
Shader2X
 Inherited_paramsMap : *
Shader
 Inherited_preCompileShader : *
[static]
Shader
 Inherited_program : * = null
Shader
 Inherited_pshader : *
Shader
  _shaderValueHeight : Number
Shader2X
  _shaderValueWidth : Number
Shader2X
 Inheritedsharders : Array
[static]
Shader
 Inheritedtag : *
Shader
 Inherited_vshader : *
Shader
Protected Properties
 PropertyDefined By
 InheritedshaderParamsMap : Object
[static]
Shader
Public Methods
 MethodDefined By
  
Shader2X(vs:String, ps:String, saveName:* = null, nameMap:* = null)
Shader2X
  
Shader2X
  
Shader2X
 Inherited
addInclude(fileName:String, txt:String):void
[static]
Shader
  
create(vs:String, ps:String, saveName:* = null, nameMap:* = null):Shader
[static]
Shader2X
 Inherited
getParams():Array
得到编译后的变量及相关预定义
Shader
 Inherited
[static]
Shader
 Inherited
getUniform(name:String):*
根据变量名字获得
Shader
 Inherited
preCompile(nameID:int, vs:String, ps:String, nameMap:*):void
[static] 预编译shader文件,主要是处理宏定义
Shader
 Inherited
preCompile2D(nameID:int, mainID:int, vs:String, ps:String, nameMap:*):void
[static] 预编译shader文件,主要是处理宏定义
Shader
 Inherited
upload(shaderValue:ShaderValue, params:Array = null):void
提交shader到GPU
Shader
  
upload2dQuick1(shaderValue:ShaderValue):void
Shader2X
  
upload2dQuick2(shaderValue:ShaderValue):void
Shader2X
 Inherited
uploadArray(shaderValue:Array, length:int, _bufferUsage:*):void
按数组的定义提交
Shader
 Inherited
uploadOne(name:String, value:*):void
Shader
 Inherited
uploadTexture2D(value:*):void
Shader
 Inherited
withCompile(nameID:int, define:*, shaderName:*, createShader:Function):Shader
[static] 根据宏动态生成shader文件,支持#include?COLOR_FILTER "parts/ColorFilter_ps_logic.glsl";条件嵌入文件
Shader
 Inherited
withCompile2D(nameID:int, mainID:int, define:*, shaderName:*, createShader:Function):Shader
[static] 根据宏动态生成shader文件,支持#include?COLOR_FILTER "parts/ColorFilter_ps_logic.glsl";条件嵌入文件
Shader
Protected Methods
 MethodDefined By
 Inherited
_preGetParams(vs:String, ps:String):Object
Shader
  
[override]
Shader2X
 Inherited
[override]
Shader
Public Constants
 ConstantDefined By
 InheritedSHADERNAME2ID : Number = 0.0002
[static]
Shader
Property Detail
_params2dQuick1property
public var _params2dQuick1:Array = null

_params2dQuick2property 
public var _params2dQuick2:Array = null

_shaderValueHeightproperty 
public var _shaderValueHeight:Number

_shaderValueWidthproperty 
public var _shaderValueWidth:Number

Constructor Detail
Shader2X()Constructor
public function Shader2X(vs:String, ps:String, saveName:* = null, nameMap:* = null)



Parameters
vs:String
 
ps:String
 
saveName:* (default = null)
 
nameMap:* (default = null)
Method Detail
_make2dQuick1()method
public function _make2dQuick1():Array

Returns
Array
_make2dQuick2()method 
public function _make2dQuick2():Array

Returns
Array
create()method 
public static function create(vs:String, ps:String, saveName:* = null, nameMap:* = null):Shader

Parameters

vs:String
 
ps:String
 
saveName:* (default = null)
 
nameMap:* (default = null)

Returns
Shader
detoryResource()method 
override protected function detoryResource():void

upload2dQuick1()method 
public function upload2dQuick1(shaderValue:ShaderValue):void

Parameters

shaderValue:ShaderValue

upload2dQuick2()method 
public function upload2dQuick2(shaderValue:ShaderValue):void

Parameters

shaderValue:ShaderValue