Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
4d91713e
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,发现更多精彩内容 >>
提交
4d91713e
编写于
9月 02, 2012
作者:
A
alteredq
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'normalmap_flip_hack' into dev
上级
aa33873a
25bffd0d
变更
14
展开全部
隐藏空白更改
内联
并排
Showing
14 changed file
with
42 addition
and
40 deletion
+42
-40
build/three.min.js
build/three.min.js
+24
-24
examples/misc_camera_fly.html
examples/misc_camera_fly.html
+1
-1
examples/webgl_loader_ctm.html
examples/webgl_loader_ctm.html
+1
-1
examples/webgl_materials_normalmap.html
examples/webgl_materials_normalmap.html
+2
-0
examples/webgl_materials_normalmap2.html
examples/webgl_materials_normalmap2.html
+1
-1
examples/webgl_postprocessing.html
examples/webgl_postprocessing.html
+1
-1
examples/webgl_trackballcamera_earth.html
examples/webgl_trackballcamera_earth.html
+1
-1
src/extras/ShaderUtils.js
src/extras/ShaderUtils.js
+2
-2
src/loaders/GeometryLoader.js
src/loaders/GeometryLoader.js
+1
-1
src/loaders/Loader.js
src/loaders/Loader.js
+1
-1
src/loaders/SceneLoader.js
src/loaders/SceneLoader.js
+1
-1
src/materials/MeshPhongMaterial.js
src/materials/MeshPhongMaterial.js
+3
-3
src/renderers/WebGLRenderer.js
src/renderers/WebGLRenderer.js
+1
-1
src/renderers/WebGLShaders.js
src/renderers/WebGLShaders.js
+2
-2
未找到文件。
build/three.min.js
浏览文件 @
4d91713e
此差异已折叠。
点击以展开。
examples/misc_camera_fly.html
浏览文件 @
4d91713e
...
...
@@ -118,7 +118,7 @@
var
uniforms
=
THREE
.
UniformsUtils
.
clone
(
shader
.
uniforms
);
uniforms
[
"
tNormal
"
].
value
=
normalTexture
;
uniforms
[
"
uNormalScale
"
].
value
=
0.85
;
uniforms
[
"
uNormalScale
"
].
value
.
set
(
0.85
,
0.85
)
;
uniforms
[
"
tDiffuse
"
].
value
=
planetTexture
;
uniforms
[
"
tSpecular
"
].
value
=
specularTexture
;
...
...
examples/webgl_loader_ctm.html
浏览文件 @
4d91713e
...
...
@@ -195,7 +195,7 @@
var
uniforms
=
THREE
.
UniformsUtils
.
clone
(
shader
.
uniforms
);
uniforms
[
"
tNormal
"
].
value
=
THREE
.
ImageUtils
.
loadTexture
(
"
obj/leeperrysmith/Infinite-Level_02_Tangent_SmoothUV.jpg
"
);
uniforms
[
"
uNormalScale
"
].
value
=
0.8
;
uniforms
[
"
uNormalScale
"
].
value
.
set
(
0.8
,
0.8
)
;
uniforms
[
"
tDiffuse
"
].
value
=
THREE
.
ImageUtils
.
loadTexture
(
"
obj/leeperrysmith/Map-COL.jpg
"
);
uniforms
[
"
tSpecular
"
].
value
=
THREE
.
ImageUtils
.
loadTexture
(
"
obj/leeperrysmith/Map-SPEC.jpg
"
);
...
...
examples/webgl_materials_normalmap.html
浏览文件 @
4d91713e
...
...
@@ -169,6 +169,8 @@
uniforms
[
"
uDisplacementBias
"
].
value
=
-
0.428408
;
uniforms
[
"
uDisplacementScale
"
].
value
=
2.436143
;
uniforms
[
"
uNormalScale
"
].
value
.
y
=
-
1
;
uniforms
[
"
uDiffuseColor
"
].
value
.
setHex
(
diffuse
);
uniforms
[
"
uSpecularColor
"
].
value
.
setHex
(
specular
);
uniforms
[
"
uAmbientColor
"
].
value
.
setHex
(
ambient
);
...
...
examples/webgl_materials_normalmap2.html
浏览文件 @
4d91713e
...
...
@@ -125,7 +125,7 @@
var
uniforms
=
THREE
.
UniformsUtils
.
clone
(
shader
.
uniforms
);
uniforms
[
"
tNormal
"
].
value
=
THREE
.
ImageUtils
.
loadTexture
(
"
obj/leeperrysmith/Infinite-Level_02_Tangent_SmoothUV.jpg
"
);
uniforms
[
"
uNormalScale
"
].
value
=
0.8
;
uniforms
[
"
uNormalScale
"
].
value
.
set
(
0.8
,
0.8
)
;
uniforms
[
"
tDiffuse
"
].
value
=
THREE
.
ImageUtils
.
loadTexture
(
"
obj/leeperrysmith/Map-COL.jpg
"
);
uniforms
[
"
tSpecular
"
].
value
=
THREE
.
ImageUtils
.
loadTexture
(
"
obj/leeperrysmith/Map-SPEC.jpg
"
);
...
...
examples/webgl_postprocessing.html
浏览文件 @
4d91713e
...
...
@@ -328,7 +328,7 @@
var
uniforms
=
THREE
.
UniformsUtils
.
clone
(
shader
.
uniforms
);
uniforms
[
"
tNormal
"
].
value
=
THREE
.
ImageUtils
.
loadTexture
(
"
obj/leeperrysmith/Infinite-Level_02_Tangent_SmoothUV.jpg
"
);
uniforms
[
"
uNormalScale
"
].
value
=
0.75
;
uniforms
[
"
uNormalScale
"
].
value
.
set
(
0.75
,
0.75
)
;
uniforms
[
"
tDiffuse
"
].
value
=
THREE
.
ImageUtils
.
loadTexture
(
"
obj/leeperrysmith/Map-COL.jpg
"
);
...
...
examples/webgl_trackballcamera_earth.html
浏览文件 @
4d91713e
...
...
@@ -133,7 +133,7 @@
uniforms
=
THREE
.
UniformsUtils
.
clone
(
shader
.
uniforms
);
uniforms
[
"
tNormal
"
].
value
=
normalTexture
;
uniforms
[
"
uNormalScale
"
].
value
=
0.85
;
uniforms
[
"
uNormalScale
"
].
value
.
set
(
0.85
,
0.85
)
;
uniforms
[
"
tDiffuse
"
].
value
=
planetTexture
;
uniforms
[
"
tSpecular
"
].
value
=
specularTexture
;
...
...
src/extras/ShaderUtils.js
浏览文件 @
4d91713e
...
...
@@ -121,7 +121,7 @@ THREE.ShaderUtils = {
"
tSpecular
"
:
{
type
:
"
t
"
,
value
:
null
},
"
tAO
"
:
{
type
:
"
t
"
,
value
:
null
},
"
uNormalScale
"
:
{
type
:
"
f
"
,
value
:
1.0
},
"
uNormalScale
"
:
{
type
:
"
v2
"
,
value
:
new
THREE
.
Vector2
(
1
,
1
)
},
"
uDisplacementBias
"
:
{
type
:
"
f
"
,
value
:
0.0
},
"
uDisplacementScale
"
:
{
type
:
"
f
"
,
value
:
1.0
},
...
...
@@ -165,7 +165,7 @@ THREE.ShaderUtils = {
"
uniform samplerCube tCube;
"
,
"
uniform
float
uNormalScale;
"
,
"
uniform
vec2
uNormalScale;
"
,
"
uniform bool useRefract;
"
,
"
uniform float uRefractionRatio;
"
,
...
...
src/loaders/GeometryLoader.js
浏览文件 @
4d91713e
...
...
@@ -336,7 +336,7 @@ THREE.GeometryLoader.prototype = {
if
(
m
.
mapNormalFactor
)
{
uniforms
[
"
uNormalScale
"
].
value
=
m
.
mapNormalFactor
;
uniforms
[
"
uNormalScale
"
].
value
.
set
(
m
.
mapNormalFactor
,
m
.
mapNormalFactor
)
;
}
...
...
src/loaders/Loader.js
浏览文件 @
4d91713e
...
...
@@ -346,7 +346,7 @@ THREE.Loader.prototype = {
if
(
m
.
mapNormalFactor
)
{
uniforms
[
"
uNormalScale
"
].
value
=
m
.
mapNormalFactor
;
uniforms
[
"
uNormalScale
"
].
value
.
set
(
m
.
mapNormalFactor
,
m
.
mapNormalFactor
)
;
}
...
...
src/loaders/SceneLoader.js
浏览文件 @
4d91713e
...
...
@@ -729,7 +729,7 @@ THREE.SceneLoader.prototype.parse = function ( json, callbackFinished, url ) {
if
(
m
.
parameters
.
normalMapFactor
)
{
uniforms
[
"
uNormalScale
"
].
value
=
m
.
parameters
.
normalMapFactor
;
uniforms
[
"
uNormalScale
"
].
value
.
set
(
m
.
parameters
.
normalMapFactor
,
m
.
parameters
.
normalMapFactor
)
;
}
...
...
src/materials/MeshPhongMaterial.js
浏览文件 @
4d91713e
...
...
@@ -18,7 +18,7 @@
* bumpScale: <float>,
*
* normalMap: new THREE.Texture( <Image> ),
* normalScale: <
float
>,
* normalScale: <
Vector2
>,
*
* specularMap: new THREE.Texture( <Image> ),
*
...
...
@@ -68,7 +68,7 @@ THREE.MeshPhongMaterial = function ( parameters ) {
this
.
bumpScale
=
1
;
this
.
normalMap
=
null
;
this
.
normalScale
=
1
;
this
.
normalScale
=
new
THREE
.
Vector2
(
1
,
1
)
;
this
.
specularMap
=
null
;
...
...
@@ -124,7 +124,7 @@ THREE.MeshPhongMaterial.prototype.clone = function () {
material
.
bumpScale
=
this
.
bumpScale
;
material
.
normalMap
=
this
.
normalMap
;
material
.
normalScale
=
this
.
normalScale
;
material
.
normalScale
.
copy
(
this
.
normalScale
)
;
material
.
specularMap
=
this
.
specularMap
;
...
...
src/renderers/WebGLRenderer.js
浏览文件 @
4d91713e
...
...
@@ -4949,7 +4949,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if
(
material
.
normalMap
)
{
uniforms
.
normalMap
.
value
=
material
.
normalMap
;
uniforms
.
normalScale
.
value
=
material
.
normalScale
;
uniforms
.
normalScale
.
value
.
copy
(
material
.
normalScale
)
;
}
...
...
src/renderers/WebGLShaders.js
浏览文件 @
4d91713e
...
...
@@ -375,7 +375,7 @@ THREE.ShaderChunk = {
"
#ifdef USE_NORMALMAP
"
,
"
uniform sampler2D normalMap;
"
,
"
uniform
float
normalScale;
"
,
"
uniform
vec2
normalScale;
"
,
// Per-Pixel Tangent Space Normal Mapping
// http://hacksoflife.blogspot.ch/2009/11/per-pixel-tangent-space-normal-mapping.html
...
...
@@ -1810,7 +1810,7 @@ THREE.UniformsLib = {
normalmap
:
{
"
normalMap
"
:
{
type
:
"
t
"
,
value
:
null
},
"
normalScale
"
:
{
type
:
"
f
"
,
value
:
1
}
"
normalScale
"
:
{
type
:
"
v2
"
,
value
:
new
THREE
.
Vector2
(
1
,
1
)
}
},
fog
:
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录