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

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

1. 添加Include(ActionScript-3D基础(AS3)-LayaAir3D之shader) [ 100%]

...加Include。LayaAir3D引用的类库 ```typescript Shader3D.addInclude("Lighting.glsl", __INCLUDESTR__("files/Lighting.glsl")); Shader3D.addInclude("ShadowHelper.glsl", __INCLUDESTR__("files/ShadowHelper.glsl")); Shader3D.addInclude("BRDF.glsl", __INCLUDESTR__("files/PBRLibs/BRDF.glsl")); Shader3D....

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

2. 添加Include(TypeScript-3D基础(TS)-LayaAir3D之Shader) [ 99%]

...要在 `addPass`之前 > 引用的方式导入文件 ```typescript import LightingGLSL from "./files/Lighting.glsl"; import BRDFGLSL from "./files/PBRLibs/BRDF.glsl"; import PBRSpecularLightingGLSL from "./files/PBRLibs/PBRSpecularLighting.glsl"; import PBRStandardLightingGLSL from "./files/PBRLibs/...

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

3. 添加Include(JavaScript-3D基础(JS)-LayaAir3D之shader) [ 88%]

...需要在 `addPass`之前 > 引用的方式导入文件 ```typescript let LightingGLSL = `...这里面是Shader源码`; let BRDFGLSL = `...这里面是Shader源码`; let PBRSpecularLightingGLSL = `...这里面是Shader源码`; let PBRStandardLightingGLSL = `...这里面是Shader源码`; let PBRUtils...

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

4. SubShader介绍(JavaScript-3D基础(JS)-LayaAir3D之shader) [ 80%]

...pescript //引入Shader需要使用的其他库文件 Shader3D.addInclude("Lighting.glsl", LightingGLSL); Shader3D.addInclude("ShadowSampleTent.glsl", ShadowSampleTentGLSL); Shader3D.addInclude("GlobalIllumination.glsl", GlobalIllumination) Shader3D.addInclude("Shadow.glsl", ShadowGLSL); Shader3D.ad...

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

5. SubShader介绍(TypeScript-3D基础(TS)-LayaAir3D之Shader) [ 80%]

...pescript //引入Shader需要使用的其他库文件 Shader3D.addInclude("Lighting.glsl", LightingGLSL); Shader3D.addInclude("ShadowSampleTent.glsl", ShadowSampleTentGLSL); Shader3D.addInclude("GlobalIllumination.glsl", GlobalIllumination) Shader3D.addInclude("Shadow.glsl", ShadowGLSL); Shader3D.ad...

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

6. SubShader介绍(ActionScript-3D基础(AS3)-LayaAir3D之shader) [ 80%]

...pescript //引入Shader需要使用的其他库文件 Shader3D.addInclude("Lighting.glsl", LightingGLSL); Shader3D.addInclude("ShadowSampleTent.glsl", ShadowSampleTentGLSL); Shader3D.addInclude("GlobalIllumination.glsl", GlobalIllumination) Shader3D.addInclude("Shadow.glsl", ShadowGLSL); Shader3D.ad...

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

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

... highp float; #else precision mediump float; #endif uniform float u_OutlineLightness; uniform vec4 u_OutlineColor; void main() { vec3 finalColor = u_OutlineColor.rgb * u_OutlineLightness; gl_FragColor = vec4(finalColor,0.0); } ``` ##### 第二个Pass使用的着色器: 顶点着色器 `outline02.v...

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

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

...als`下 顶点着色器 `simpleShader.vs` 代码如下: ```c++ #include "Lighting.glsl"; attribute vec4 a_Position; 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...

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

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

...als`下 顶点着色器 `simpleShader.vs` 代码如下: ```c++ #include "Lighting.glsl"; attribute vec4 a_Position; 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...

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

10. 关联shader的uniform(JavaScript-3D基础(JS)-LayaAir3D之shader) [ 40%]

... highp float; #else precision mediump float; #endif uniform float u_OutlineLightness; uniform vec4 u_OutlineColor; void main() { vec3 finalColor = u_OutlineColor.rgb * u_OutlineLightness; gl_FragColor = vec4(finalColor,0.0); } ``` ##### 第二个Pass使用的着色器: 顶点着色器 `outline02.v...

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