Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
970f47a2
T
three.js
项目概览
Ablesons
/
three.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
three.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
970f47a2
编写于
10月 21, 2019
作者:
M
Mugen87
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
WebGLPrograms: Enable uvs only in vertex shader.
上级
117e86ae
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
15 addition
and
3 deletion
+15
-3
src/renderers/shaders/ShaderChunk/uv_pars_fragment.glsl.js
src/renderers/shaders/ShaderChunk/uv_pars_fragment.glsl.js
+1
-1
src/renderers/shaders/ShaderChunk/uv_pars_vertex.glsl.js
src/renderers/shaders/ShaderChunk/uv_pars_vertex.glsl.js
+10
-1
src/renderers/webgl/WebGLProgram.js
src/renderers/webgl/WebGLProgram.js
+2
-0
src/renderers/webgl/WebGLPrograms.js
src/renderers/webgl/WebGLPrograms.js
+2
-1
未找到文件。
src/renderers/shaders/ShaderChunk/uv_pars_fragment.glsl.js
浏览文件 @
970f47a2
export
default
/* glsl */
`
#if
def USE_UV
#if
( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )
varying vec2 vUv;
...
...
src/renderers/shaders/ShaderChunk/uv_pars_vertex.glsl.js
浏览文件 @
970f47a2
export
default
/* glsl */
`
#ifdef USE_UV
#ifdef UVS_VERTEX_ONLY
vec2 vUv;
#else
varying vec2 vUv;
#endif
uniform mat3 uvTransform;
#endif
...
...
src/renderers/webgl/WebGLProgram.js
浏览文件 @
970f47a2
...
...
@@ -470,6 +470,7 @@ function WebGLProgram( renderer, extensions, code, material, shader, parameters
parameters
.
vertexTangents
?
'
#define USE_TANGENT
'
:
''
,
parameters
.
vertexColors
?
'
#define USE_COLOR
'
:
''
,
parameters
.
vertexUvs
?
'
#define USE_UV
'
:
''
,
parameters
.
uvsVertexOnly
?
'
#define UVS_VERTEX_ONLY
'
:
''
,
parameters
.
flatShading
?
'
#define FLAT_SHADED
'
:
''
,
...
...
@@ -595,6 +596,7 @@ function WebGLProgram( renderer, extensions, code, material, shader, parameters
parameters
.
vertexTangents
?
'
#define USE_TANGENT
'
:
''
,
parameters
.
vertexColors
?
'
#define USE_COLOR
'
:
''
,
parameters
.
vertexUvs
?
'
#define USE_UV
'
:
''
,
parameters
.
uvsVertexOnly
?
'
#define UVS_VERTEX_ONLY
'
:
''
,
parameters
.
gradientMap
?
'
#define USE_GRADIENTMAP
'
:
''
,
...
...
src/renderers/webgl/WebGLPrograms.js
浏览文件 @
970f47a2
...
...
@@ -39,7 +39,7 @@ function WebGLPrograms( renderer, extensions, capabilities ) {
"
map
"
,
"
mapEncoding
"
,
"
matcap
"
,
"
matcapEncoding
"
,
"
envMap
"
,
"
envMapMode
"
,
"
envMapEncoding
"
,
"
envMapCubeUV
"
,
"
lightMap
"
,
"
aoMap
"
,
"
emissiveMap
"
,
"
emissiveMapEncoding
"
,
"
bumpMap
"
,
"
normalMap
"
,
"
objectSpaceNormalMap
"
,
"
tangentSpaceNormalMap
"
,
"
clearcoatNormalMap
"
,
"
displacementMap
"
,
"
specularMap
"
,
"
roughnessMap
"
,
"
metalnessMap
"
,
"
gradientMap
"
,
"
alphaMap
"
,
"
combine
"
,
"
vertexColors
"
,
"
vertexTangents
"
,
"
vertexUvs
"
,
"
fog
"
,
"
useFog
"
,
"
fogExp2
"
,
"
alphaMap
"
,
"
combine
"
,
"
vertexColors
"
,
"
vertexTangents
"
,
"
vertexUvs
"
,
"
uvsVertexOnly
"
,
"
fog
"
,
"
useFog
"
,
"
fogExp2
"
,
"
flatShading
"
,
"
sizeAttenuation
"
,
"
logarithmicDepthBuffer
"
,
"
skinning
"
,
"
maxBones
"
,
"
useVertexTexture
"
,
"
morphTargets
"
,
"
morphNormals
"
,
"
maxMorphTargets
"
,
"
maxMorphNormals
"
,
"
premultipliedAlpha
"
,
...
...
@@ -186,6 +186,7 @@ function WebGLPrograms( renderer, extensions, capabilities ) {
vertexTangents
:
(
material
.
normalMap
&&
material
.
vertexTangents
),
vertexColors
:
material
.
vertexColors
,
vertexUvs
:
!!
material
.
map
||
!!
material
.
bumpMap
||
!!
material
.
normalMap
||
!!
material
.
specularMap
||
!!
material
.
alphaMap
||
!!
material
.
emissiveMap
||
!!
material
.
roughnessMap
||
!!
material
.
metalnessMap
||
!!
material
.
clearcoatNormalMap
||
!!
material
.
displacementMap
,
uvsVertexOnly
:
!
(
!!
material
.
map
||
!!
material
.
bumpMap
||
!!
material
.
normalMap
||
!!
material
.
specularMap
||
!!
material
.
alphaMap
||
!!
material
.
emissiveMap
||
!!
material
.
roughnessMap
||
!!
material
.
metalnessMap
||
!!
material
.
clearcoatNormalMap
)
&&
!!
material
.
displacementMap
,
fog
:
!!
fog
,
useFog
:
material
.
fog
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录