• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 23 项符合查询结果, 库内数据总量为 30,784 项。 (搜索耗时: 0.0029 秒)

1. 描边Shader,使用了两个Pass [ 100%]

...uper() var attributeMap = { 'a_Position': Laya.VertexMesh.MESH_POSITION0, 'a_Normal': Laya.VertexMesh.MESH_NORMAL0, 'a_Texcoord': Laya.VertexMesh.MESH_TEXTURECOORDINATE0, } var uniformMap = { 'u_MvpMatrix': [Laya.Sprite3D.MVPMATRIX, Laya.Shader3D.PERIOD_SPRITE], 'u_WorldMat': [Laya.Sprite3D.WORLDMAT...

来源: Laya_社区 发布时间: 20180925

2. ShaderPass介绍(JavaScript-3D基础(JS)-LayaAir3D之shader) [ 99%]

...tline.vs` 代码如下: ```c++ attribute vec4 a_Position; attribute vec3 a_Normal; uniform mat4 u_MvpMatrix; uniform float u_OutlineWidth; void main() { vec4 position = vec4(a_Position.xyz + a_Normal * u_OutlineWidth, 1.0); gl_Position = u_MvpMatrix * position; } ``` 片元着色器 `outline.fs` ...

来源: Laya2.0_文档 发布时间: 20210714

3. 自定义shader-简单shader [ 99%]

...) { var attributeMap = { 'a_Position': Laya.VertexElementUsage.POSITION0, 'a_Normal': Laya.VertexElementUsage.NORMAL0 }; var uniformMap = { 'u_MvpMatrix': [Laya.Sprite3D.MVPMATRIX, Laya.Shader3D.PERIOD_SPRITE], 'u_WorldMat': [Laya.Sprite3D.WORLDMATRIX, Laya.Shader3D.PERIOD_SPRITE] }; var customShade...

来源: Laya_示例 发布时间: 20241123

4. 写shader还区分2d,与3d么!看官网是3d的shader例子,有没有2d的shader例子? [ 92%]

...d { var attributeMap = { 'a_Position': Laya.VertexElementUsage.POSITION0, 'a_Normal': Laya.VertexElementUsage.NORMAL0 }; var uniformMap = { 'u_MvpMatrix': [Laya.Sprite3D.MVPMATRIX, Laya.Shader3D.PERIOD_SPRITE], 'u_WorldMat': [Laya.Sprite3D.WORLDMATRIX, Laya.Shader3D.PERIOD_SPRITE] }; var customShade...

来源: Laya_社区 发布时间: 20180904

5. 如何自定义Shader(JavaScript-3D基础(JS)-LayaAir3D之shader) [ 90%]

...osition; uniform mat4 u_MvpMatrix; uniform mat4 u_WorldMat; attribute vec3 a_Normal; varying vec3 v_Normal; void main() { gl_Position = u_MvpMatrix * a_Position; mat3 worldMat=mat3(u_WorldMat); v_Normal=worldMat*a_Normal; }`; let simpleShaderFS = ` #ifdef FSHIGHPRECISION precision highp float; #else...

来源: Laya2.0_文档 发布时间: 20210715

6. 如何自定义Shader(TypeScript-3D基础(TS)-LayaAir3D之Shader) [ 89%]

...osition; uniform mat4 u_MvpMatrix; uniform mat4 u_WorldMat; attribute vec3 a_Normal; varying vec3 v_Normal; void main() { gl_Position = u_MvpMatrix * a_Position; mat3 worldMat=mat3(u_WorldMat); v_Normal=worldMat*a_Normal; gl_Position=remapGLPositionZ(gl_Position); } ``` 片元着色器 `simpleShader...

来源: Laya2.0_文档 发布时间: 20210715

7. 如何自定义Shader(ActionScript-3D基础(AS3)-LayaAir3D之shader) [ 88%]

...osition; uniform mat4 u_MvpMatrix; uniform mat4 u_WorldMat; attribute vec3 a_Normal; varying vec3 v_Normal; void main() { gl_Position = u_MvpMatrix * a_Position; mat3 worldMat=mat3(u_WorldMat); v_Normal=worldMat*a_Normal; gl_Position=remapGLPositionZ(gl_Position); } ``` 片元着色器 `simpleShader...

来源: Laya2.0_文档 发布时间: 20210715

8. ShaderPass介绍(TypeScript-3D基础(TS)-LayaAir3D之Shader) [ 88%]

...tline.vs` 代码如下: ```c++ attribute vec4 a_Position; attribute vec3 a_Normal; uniform mat4 u_MvpMatrix; uniform float u_OutlineWidth; void main() { vec4 position = vec4(a_Position.xyz + a_Normal * u_OutlineWidth, 1.0); gl_Position = u_MvpMatrix * position; } ``` 片元着色器 `outline.fs` ...

来源: Laya2.0_文档 发布时间: 20210715

9. ShaderPass介绍(ActionScript-3D基础(AS3)-LayaAir3D之shader) [ 87%]

...tline.vs` 代码如下: ```c++ attribute vec4 a_Position; attribute vec3 a_Normal; uniform mat4 u_MvpMatrix; uniform float u_OutlineWidth; void main() { vec4 position = vec4(a_Position.xyz + a_Normal * u_OutlineWidth, 1.0); gl_Position = u_MvpMatrix * position; } ``` 片元着色器 `outline.fs` ...

来源: Laya2.0_文档 发布时间: 20210715

10. 角色模型的材质列表切换后,不播放动作了 [ 87%]

...der var attributeMap = { 'a_Position': Laya.VertexElementUsage.POSITION0, 'a_Normal': Laya.VertexElementUsage.NORMAL0, 'a_Texcoord': Laya.VertexElementUsage.TEXTURECOORDINATE0 }; var uniformMap = { 'u_MvpMatrix': [Laya.Sprite3D.MVPMATRIX, Laya.Shader3D.PERIOD_SPRITE], 'u_WorldMat': [Laya.Sprite3D.WO...

来源: Laya_社区 发布时间: 20170815