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

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

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

..._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.xy += v_Normal.xy * 0.04; }` var outline_ps = ` #ifdef FSHIGHPRECISION precision hi...

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

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

..._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 precision mediump floa...

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

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

...uniform mat4 u_WorldMat;\n" + "attribute vec3 a_Normal;\n" + "varying vec3 v_Normal;\n" + "void main(){\n" + "gl_Position = u_MvpMatrix * a_Position;\n" + "mat3 worldMat=mat3(u_WorldMat);\n" + "v_Normal=worldMat*a_Normal;}"; var ps = "#ifdef FSHIGHPRECISION\n" + "precision highp float;\n" + "#else\n...

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

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

..._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.fs` 代码如下: ```c...

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

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

..._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.fs` 代码如下: ```c...

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

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

...uniform mat4 u_WorldMat;\n" + "attribute vec3 a_Normal;\n" + "varying vec3 v_Normal;\n" + "void main(){\n" + "gl_Position = u_MvpMatrix * a_Position;\n" + "mat3 worldMat=mat3(u_WorldMat);\n" + "v_Normal=worldMat*a_Normal;}"; var ps: string = "#ifdef FSHIGHPRECISION\n" + "precision highp float;\n" + ...

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

7. 分享水波一个shader [ 84%]

...ldMat; uniform mat4 u_MvpMatrix;   varying vec2 v_textcoord; varying vec3 v_normal; varying vec4 v_wpos;   void main() { v_textcoord = a_Textcoord; v_normal = a_Normal; v_wpos = u_WorldMat * a_Position; gl_Position = u_MvpMatrix * a_Position; }`; var ps:string = ` #ifdef HIGHPRECISION precision hi...

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

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

..._MvpMatrix; uniform mat4 u_WorldMat; attribute vec3 a_Normal; varying vec3 v_Normal; varying vec2 v_Texcoord0; void main() { gl_Position = u_MvpMatrix * a_Position; mat3 worldMat=mat3(u_WorldMat); v_Normal=worldMat*a_Normal; v_Texcoord0 = a_Texcoord0; gl_Position=remapGLPositionZ(gl_Position); } ```...

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

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

...uniform mat4 u_WorldMat;\n" + "attribute vec3 a_Normal;\n" + "varying vec3 v_Normal;\n" + "varying vec2 v_Texcoord;\n" + "void main(){\n" + "gl_Position = u_MvpMatrix * a_Position;\n" + "mat3 worldMat=mat3(u_WorldMat);\n" + "v_Texcoord=a_Texcoord;\n" + "v_Normal=worldMat*a_Normal;}"; var ps = "#ifde...

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

10. 自定义shader-边缘光照shader [ 77%]

...uniform mat4 u_WorldMat;\n" + "varying vec2 v_Texcoord;\n" + "varying vec3 v_Normal;\n" + "#ifdef BONE\n" + "attribute vec4 a_BoneIndices;\n" + "attribute vec4 a_BoneWeights;\n" + "const int c_MaxBoneCount = 24;\n" + "uniform mat4 u_Bones[c_MaxBoneCount];\n" + "#endif\n" + "#if defined(DIRECTIONLIGH...

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