Package | laya.webgl.shader.d2 |
Class | public class Shader2X |
Inheritance | Shader2X Shader BaseShader laya.resource.Resource |
Property | Defined By | ||
---|---|---|---|
activeShader : BaseShader [static] | BaseShader | ||
bindShader : BaseShader [static] | BaseShader | ||
_id : int | Shader | ||
nameKey : StringKey [static] | Shader | ||
_offset : int = 0 | Shader | ||
_params : Array = null | Shader | ||
_params2dQuick1 : Array = null | Shader2X | ||
_params2dQuick2 : Array = null | Shader2X | ||
_paramsMap : * | Shader | ||
_preCompileShader : * [static] | Shader | ||
_program : * = null | Shader | ||
_pshader : * | Shader | ||
_shaderValueHeight : Number | Shader2X | ||
_shaderValueWidth : Number | Shader2X | ||
sharders : Array [static] | Shader | ||
tag : * | Shader | ||
_vshader : * | Shader |
Method | Defined By | ||
---|---|---|---|
Shader2X(vs:String, ps:String, saveName:* = null, nameMap:* = null) | Shader2X | ||
_make2dQuick1():Array | Shader2X | ||
_make2dQuick2():Array | Shader2X | ||
addInclude(fileName:String, txt:String):void [static] | Shader | ||
[static] | Shader2X | ||
getParams():Array
得到编译后的变量及相关预定义
| Shader | ||
[static] | Shader | ||
getUniform(name:String):*
根据变量名字获得
| Shader | ||
preCompile(nameID:int, vs:String, ps:String, nameMap:*):void [static]
预编译shader文件,主要是处理宏定义
| Shader | ||
preCompile2D(nameID:int, mainID:int, vs:String, ps:String, nameMap:*):void [static]
预编译shader文件,主要是处理宏定义
| Shader | ||
upload(shaderValue:ShaderValue, params:Array = null):void
提交shader到GPU
| Shader | ||
upload2dQuick1(shaderValue:ShaderValue):void | Shader2X | ||
upload2dQuick2(shaderValue:ShaderValue):void | Shader2X | ||
uploadArray(shaderValue:Array, length:int, _bufferUsage:*):void
按数组的定义提交
| Shader | ||
uploadOne(name:String, value:*):void | Shader | ||
uploadTexture2D(value:*):void | Shader | ||
withCompile(nameID:int, define:*, shaderName:*, createShader:Function):Shader [static]
根据宏动态生成shader文件,支持#include?COLOR_FILTER "parts/ColorFilter_ps_logic.glsl";条件嵌入文件
| Shader | ||
withCompile2D(nameID:int, mainID:int, define:*, shaderName:*, createShader:Function):Shader [static]
根据宏动态生成shader文件,支持#include?COLOR_FILTER "parts/ColorFilter_ps_logic.glsl";条件嵌入文件
| Shader |
Method | Defined By | ||
---|---|---|---|
_preGetParams(vs:String, ps:String):Object | Shader | ||
detoryResource():void [override] | Shader2X | ||
recreateResource():void [override] | Shader |
_params2dQuick1 | property |
public var _params2dQuick1:Array = null
_params2dQuick2 | property |
public var _params2dQuick2:Array = null
_shaderValueHeight | property |
public var _shaderValueHeight:Number
_shaderValueWidth | property |
public var _shaderValueWidth:Number
Shader2X | () | Constructor |
public function Shader2X(vs:String, ps:String, saveName:* = null, nameMap:* = null)
vs:String | |
ps:String | |
saveName:* (default = null )
| |
nameMap:* (default = null )
|
_make2dQuick1 | () | method |
public function _make2dQuick1():Array
ReturnsArray |
_make2dQuick2 | () | method |
public function _make2dQuick2():Array
ReturnsArray |
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 )
|
Shader |
detoryResource | () | method |
override protected function detoryResource():void
upload2dQuick1 | () | method |
upload2dQuick2 | () | method |