Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
780906f1
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,发现更多精彩内容 >>
提交
780906f1
编写于
1月 18, 2013
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'gero3/dev' into dev
上级
d1fafc73
86c44445
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
190 addition
and
184 deletion
+190
-184
src/renderers/WebGLRenderer2.js
src/renderers/WebGLRenderer2.js
+6
-0
src/renderers/webgl/ShaderBuilder.js
src/renderers/webgl/ShaderBuilder.js
+184
-184
未找到文件。
src/renderers/WebGLRenderer2.js
浏览文件 @
780906f1
...
...
@@ -162,8 +162,14 @@ THREE.WebGLRenderer = THREE.WebGLRenderer2 = function ( parameters ) {
this
.
setViewport
=
renderer
.
setViewport
;
this
.
setScissor
=
renderer
.
setScissor
;
this
.
enableScissorTest
=
renderer
.
enableScissorTest
;
this
.
setDepthWrite
=
renderer
.
setDepthWrite
;
this
.
setDepthTest
=
renderer
.
setDepthTest
;
this
.
setRenderTarget
=
renderer
.
setRenderTarget
;
this
.
setBlending
=
renderer
.
setBlending
;
this
.
setTexture
=
renderer
.
setTexture
;
this
.
setMaterialFaces
=
renderer
.
setMaterialFaces
;
this
.
setFaceCulling
=
renderer
.
setFaceCulling
;
// Clearing
...
...
src/renderers/webgl/ShaderBuilder.js
浏览文件 @
780906f1
...
...
@@ -8,303 +8,303 @@ THREE.WebGLRenderer2.ShaderBuilder = function(renderer,info){
THREE
.
WebGLRenderer2
.
ShaderBuilder
.
prototype
.
buildProgram
=
function
(
shaderID
,
fragmentShader
,
vertexShader
,
uniforms
,
attributes
,
defines
,
parameters
)
{
var
renderer
=
this
.
renderer
;
var
p
,
pl
,
d
,
program
,
code
;
var
chunks
=
[];
var
renderer
=
this
.
renderer
;
var
p
,
pl
,
d
,
program
,
code
;
var
chunks
=
[];
// Generate code
// Generate code
if
(
shaderID
)
{
if
(
shaderID
)
{
chunks
.
push
(
shaderID
);
chunks
.
push
(
shaderID
);
}
else
{
}
else
{
chunks
.
push
(
fragmentShader
);
chunks
.
push
(
vertexShader
);
chunks
.
push
(
fragmentShader
);
chunks
.
push
(
vertexShader
);
}
for
(
d
in
defines
)
{
}
chunks
.
push
(
d
);
chunks
.
push
(
defines
[
d
]
);
for
(
d
in
defines
)
{
}
chunks
.
push
(
d
);
chunks
.
push
(
defines
[
d
]
);
for
(
p
in
parameters
)
{
}
chunks
.
push
(
p
);
chunks
.
push
(
parameters
[
p
]
);
for
(
p
in
parameters
)
{
}
chunks
.
push
(
p
);
chunks
.
push
(
parameters
[
p
]
);
code
=
chunks
.
join
();
}
// Check if code has been already compiled
code
=
chunks
.
join
();
for
(
p
=
0
,
pl
=
this
.
programs
.
length
;
p
<
pl
;
p
++
)
{
// Check if code has been already compiled
var
programInfo
=
this
.
programs
[
p
];
for
(
p
=
0
,
pl
=
this
.
programs
.
length
;
p
<
pl
;
p
++
)
{
if
(
programInfo
.
code
===
code
)
{
var
programInfo
=
this
.
programs
[
p
];
//console.log( "Code already compiled." /*: \n\n" + code*/ );
if
(
programInfo
.
code
===
code
)
{
programInfo
.
usedTimes
++
;
//console.log( "Code already compiled." /*: \n\n" + code*/ )
;
return
programInfo
.
program
;
programInfo
.
usedTimes
++
;
}
return
programInfo
.
program
;
}
var
shadowMapTypeDefine
=
"
SHADOWMAP_TYPE_BASIC
"
;
}
if
(
parameters
.
shadowMapType
===
THREE
.
PCFShadowMap
)
{
var
shadowMapTypeDefine
=
"
SHADOWMAP_TYPE_BASIC
"
;
shadowMapTypeDefine
=
"
SHADOWMAP_TYPE_PCF
"
;
if
(
parameters
.
shadowMapType
===
THREE
.
PCFShadowMap
)
{
}
else
if
(
parameters
.
shadowMapType
===
THREE
.
PCFSoftShadowMap
)
{
shadowMapTypeDefine
=
"
SHADOWMAP_TYPE_PCF
"
;
shadowMapTypeDefine
=
"
SHADOWMAP_TYPE_PCF_SOFT
"
;
}
else
if
(
parameters
.
shadowMapType
===
THREE
.
PCFSoftShadowMap
)
{
}
shadowMapTypeDefine
=
"
SHADOWMAP_TYPE_PCF_SOFT
"
;
//console.log( "building new program " );
}
//
//console.log( "building new program " );
var
customDefines
=
this
.
generateDefines
(
defines
);
//
//
var
customDefines
=
this
.
generateDefines
(
defines
);
var
prefix_vertex
=
[
//
"
precision
"
+
renderer
.
precision
+
"
float;
"
,
var
prefix_vertex
=
[
customDefines
,
"
precision
"
+
renderer
.
precision
+
"
float;
"
,
renderer
.
supportsVertexTextures
?
"
#define VERTEX_TEXTURES
"
:
""
,
customDefines
,
parameters
.
gammaInput
?
"
#define GAMMA_INPUT
"
:
""
,
parameters
.
gammaOutput
?
"
#define GAMMA_OUTPUT
"
:
""
,
parameters
.
physicallyBasedShading
?
"
#define PHYSICALLY_BASED_SHADING
"
:
""
,
renderer
.
supportsVertexTextures
?
"
#define VERTEX_TEXTURES
"
:
""
,
"
#define MAX_DIR_LIGHTS
"
+
parameters
.
maxDirLights
,
"
#define MAX_POINT_LIGHTS
"
+
parameters
.
maxPointLights
,
"
#define MAX_SPOT_LIGHTS
"
+
parameters
.
maxSpotLights
,
"
#define MAX_HEMI_LIGHTS
"
+
parameters
.
maxHemiLights
,
parameters
.
gammaInput
?
"
#define GAMMA_INPUT
"
:
""
,
parameters
.
gammaOutput
?
"
#define GAMMA_OUTPUT
"
:
""
,
parameters
.
physicallyBasedShading
?
"
#define PHYSICALLY_BASED_SHADING
"
:
""
,
"
#define MAX_SHADOWS
"
+
parameters
.
maxShadows
,
"
#define MAX_DIR_LIGHTS
"
+
parameters
.
maxDirLights
,
"
#define MAX_POINT_LIGHTS
"
+
parameters
.
maxPointLights
,
"
#define MAX_SPOT_LIGHTS
"
+
parameters
.
maxSpotLights
,
"
#define MAX_HEMI_LIGHTS
"
+
parameters
.
maxHemiLights
,
"
#define MAX_BONES
"
+
parameters
.
maxBone
s
,
"
#define MAX_SHADOWS
"
+
parameters
.
maxShadow
s
,
parameters
.
map
?
"
#define USE_MAP
"
:
""
,
parameters
.
envMap
?
"
#define USE_ENVMAP
"
:
""
,
parameters
.
lightMap
?
"
#define USE_LIGHTMAP
"
:
""
,
parameters
.
bumpMap
?
"
#define USE_BUMPMAP
"
:
""
,
parameters
.
normalMap
?
"
#define USE_NORMALMAP
"
:
""
,
parameters
.
specularMap
?
"
#define USE_SPECULARMAP
"
:
""
,
parameters
.
vertexColors
?
"
#define USE_COLOR
"
:
""
,
"
#define MAX_BONES
"
+
parameters
.
maxBones
,
parameters
.
skinning
?
"
#define USE_SKINNING
"
:
""
,
parameters
.
useVertexTexture
?
"
#define BONE_TEXTURE
"
:
""
,
parameters
.
boneTextureWidth
?
"
#define N_BONE_PIXEL_X
"
+
parameters
.
boneTextureWidth
.
toFixed
(
1
)
:
""
,
parameters
.
boneTextureHeight
?
"
#define N_BONE_PIXEL_Y
"
+
parameters
.
boneTextureHeight
.
toFixed
(
1
)
:
""
,
parameters
.
map
?
"
#define USE_MAP
"
:
""
,
parameters
.
envMap
?
"
#define USE_ENVMAP
"
:
""
,
parameters
.
lightMap
?
"
#define USE_LIGHTMAP
"
:
""
,
parameters
.
bumpMap
?
"
#define USE_BUMPMAP
"
:
""
,
parameters
.
normalMap
?
"
#define USE_NORMALMAP
"
:
""
,
parameters
.
specularMap
?
"
#define USE_SPECULARMAP
"
:
""
,
parameters
.
vertexColors
?
"
#define USE_COLOR
"
:
""
,
parameters
.
morphTargets
?
"
#define USE_MORPHTARGETS
"
:
""
,
parameters
.
morphNormals
?
"
#define USE_MORPHNORMALS
"
:
""
,
parameters
.
perPixel
?
"
#define PHONG_PER_PIXEL
"
:
""
,
parameters
.
wrapAround
?
"
#define WRAP_AROUND
"
:
""
,
parameters
.
doubleSided
?
"
#define DOUBLE_SIDED
"
:
""
,
parameters
.
flipSided
?
"
#define FLIP_SIDED
"
:
""
,
parameters
.
skinning
?
"
#define USE_SKINNING
"
:
""
,
parameters
.
useVertexTexture
?
"
#define BONE_TEXTURE
"
:
""
,
parameters
.
boneTextureWidth
?
"
#define N_BONE_PIXEL_X
"
+
parameters
.
boneTextureWidth
.
toFixed
(
1
)
:
""
,
parameters
.
boneTextureHeight
?
"
#define N_BONE_PIXEL_Y
"
+
parameters
.
boneTextureHeight
.
toFixed
(
1
)
:
""
,
parameters
.
shadowMapEnabled
?
"
#define USE_SHADOWMAP
"
:
""
,
parameters
.
shadowMapEnabled
?
"
#define
"
+
shadowMapTypeDefine
:
""
,
parameters
.
shadowMapDebug
?
"
#define SHADOWMAP_DEBUG
"
:
""
,
parameters
.
shadowMapCascade
?
"
#define SHADOWMAP_CASCADE
"
:
""
,
parameters
.
morphTargets
?
"
#define USE_MORPHTARGETS
"
:
""
,
parameters
.
morphNormals
?
"
#define USE_MORPHNORMALS
"
:
""
,
parameters
.
perPixel
?
"
#define PHONG_PER_PIXEL
"
:
""
,
parameters
.
wrapAround
?
"
#define WRAP_AROUND
"
:
""
,
parameters
.
doubleSided
?
"
#define DOUBLE_SIDED
"
:
""
,
parameters
.
flipSided
?
"
#define FLIP_SIDED
"
:
""
,
parameters
.
sizeAttenuation
?
"
#define USE_SIZEATTENUATION
"
:
""
,
parameters
.
shadowMapEnabled
?
"
#define USE_SHADOWMAP
"
:
""
,
parameters
.
shadowMapEnabled
?
"
#define
"
+
shadowMapTypeDefine
:
""
,
parameters
.
shadowMapDebug
?
"
#define SHADOWMAP_DEBUG
"
:
""
,
parameters
.
shadowMapCascade
?
"
#define SHADOWMAP_CASCADE
"
:
""
,
"
uniform mat4 modelMatrix;
"
,
"
uniform mat4 modelViewMatrix;
"
,
"
uniform mat4 projectionMatrix;
"
,
"
uniform mat4 viewMatrix;
"
,
"
uniform mat3 normalMatrix;
"
,
"
uniform vec3 cameraPosition;
"
,
parameters
.
sizeAttenuation
?
"
#define USE_SIZEATTENUATION
"
:
""
,
"
attribute vec3 position;
"
,
"
attribute vec3 normal;
"
,
"
attribute vec2 uv;
"
,
"
attribute vec2 uv2;
"
,
"
uniform mat4 modelMatrix;
"
,
"
uniform mat4 modelViewMatrix;
"
,
"
uniform mat4 projectionMatrix;
"
,
"
uniform mat4 viewMatrix;
"
,
"
uniform mat3 normalMatrix;
"
,
"
uniform vec3 cameraPosition;
"
,
"
#ifdef USE_COLOR
"
,
"
attribute vec3 position;
"
,
"
attribute vec3 normal;
"
,
"
attribute vec2 uv;
"
,
"
attribute vec2 uv2;
"
,
"
attribute vec3 color;
"
,
"
#ifdef USE_COLOR
"
,
"
#endif
"
,
"
attribute vec3 color;
"
,
"
#ifdef USE_MORPHTARGETS
"
,
"
#endif
"
,
"
attribute vec3 morphTarget0;
"
,
"
attribute vec3 morphTarget1;
"
,
"
attribute vec3 morphTarget2;
"
,
"
attribute vec3 morphTarget3;
"
,
"
#ifdef USE_MORPHTARGETS
"
,
"
#ifdef USE_MORPHNORMALS
"
,
"
attribute vec3 morphTarget0;
"
,
"
attribute vec3 morphTarget1;
"
,
"
attribute vec3 morphTarget2;
"
,
"
attribute vec3 morphTarget3;
"
,
"
attribute vec3 morphNormal0;
"
,
"
attribute vec3 morphNormal1;
"
,
"
attribute vec3 morphNormal2;
"
,
"
attribute vec3 morphNormal3;
"
,
"
#ifdef USE_MORPHNORMALS
"
,
"
#else
"
,
"
attribute vec3 morphNormal0;
"
,
"
attribute vec3 morphNormal1;
"
,
"
attribute vec3 morphNormal2;
"
,
"
attribute vec3 morphNormal3;
"
,
"
attribute vec3 morphTarget4;
"
,
"
attribute vec3 morphTarget5;
"
,
"
attribute vec3 morphTarget6;
"
,
"
attribute vec3 morphTarget7;
"
,
"
#else
"
,
"
#endif
"
,
"
attribute vec3 morphTarget4;
"
,
"
attribute vec3 morphTarget5;
"
,
"
attribute vec3 morphTarget6;
"
,
"
attribute vec3 morphTarget7;
"
,
"
#endif
"
,
"
#ifdef USE_SKINNING
"
,
"
#endif
"
,
"
attribute vec4 skinIndex;
"
,
"
attribute vec4 skinWeight;
"
,
"
#ifdef USE_SKINNING
"
,
"
#endif
"
,
"
attribute vec4 skinIndex;
"
,
"
attribute vec4 skinWeight;
"
,
""
"
#endif
"
,
].
join
(
"
\n
"
);
""
var
prefix_fragment
=
[
].
join
(
"
\n
"
);
"
precision
"
+
renderer
.
precision
+
"
float;
"
,
var
prefix_fragment
=
[
(
parameters
.
bumpMap
||
parameters
.
normalMap
)
?
"
#extension GL_OES_standard_derivatives : enable
"
:
"
"
,
"
precision
"
+
renderer
.
precision
+
"
float;
"
,
customDefines
,
(
parameters
.
bumpMap
||
parameters
.
normalMap
)
?
"
#extension GL_OES_standard_derivatives : enable
"
:
""
,
"
#define MAX_DIR_LIGHTS
"
+
parameters
.
maxDirLights
,
"
#define MAX_POINT_LIGHTS
"
+
parameters
.
maxPointLights
,
"
#define MAX_SPOT_LIGHTS
"
+
parameters
.
maxSpotLights
,
"
#define MAX_HEMI_LIGHTS
"
+
parameters
.
maxHemiLights
,
customDefines
,
"
#define MAX_SHADOWS
"
+
parameters
.
maxShadows
,
"
#define MAX_DIR_LIGHTS
"
+
parameters
.
maxDirLights
,
"
#define MAX_POINT_LIGHTS
"
+
parameters
.
maxPointLights
,
"
#define MAX_SPOT_LIGHTS
"
+
parameters
.
maxSpotLights
,
"
#define MAX_HEMI_LIGHTS
"
+
parameters
.
maxHemiLights
,
parameters
.
alphaTest
?
"
#define ALPHATEST
"
+
parameters
.
alphaTest
:
""
,
"
#define MAX_SHADOWS
"
+
parameters
.
maxShadows
,
parameters
.
gammaInput
?
"
#define GAMMA_INPUT
"
:
""
,
parameters
.
gammaOutput
?
"
#define GAMMA_OUTPUT
"
:
""
,
parameters
.
alphaTest
?
"
#define ALPHATEST
"
+
parameters
.
alphaTest
:
""
,
(
parameters
.
useFog
&&
parameters
.
fog
)
?
"
#define USE_FOG
"
:
""
,
(
parameters
.
useFog
&&
parameters
.
fogExp
)
?
"
#define FOG_EXP2
"
:
""
,
parameters
.
gammaInput
?
"
#define GAMMA_INPUT
"
:
""
,
parameters
.
gammaOutput
?
"
#define GAMMA_OUTPUT
"
:
""
,
parameters
.
map
?
"
#define USE_MAP
"
:
""
,
parameters
.
envMap
?
"
#define USE_ENVMAP
"
:
""
,
parameters
.
lightMap
?
"
#define USE_LIGHTMAP
"
:
""
,
parameters
.
bumpMap
?
"
#define USE_BUMPMAP
"
:
""
,
parameters
.
normalMap
?
"
#define USE_NORMALMAP
"
:
""
,
parameters
.
specularMap
?
"
#define USE_SPECULARMAP
"
:
""
,
parameters
.
vertexColors
?
"
#define USE_COLOR
"
:
""
,
(
parameters
.
useFog
&&
parameters
.
fog
)
?
"
#define USE_FOG
"
:
""
,
(
parameters
.
useFog
&&
parameters
.
fogExp
)
?
"
#define FOG_EXP2
"
:
""
,
parameters
.
metal
?
"
#define METAL
"
:
""
,
parameters
.
perPixel
?
"
#define PHONG_PER_PIXEL
"
:
""
,
parameters
.
wrapAround
?
"
#define WRAP_AROUND
"
:
""
,
parameters
.
doubleSided
?
"
#define DOUBLE_SIDED
"
:
""
,
parameters
.
flipSided
?
"
#define FLIP_SIDED
"
:
""
,
parameters
.
map
?
"
#define USE_MAP
"
:
""
,
parameters
.
envMap
?
"
#define USE_ENVMAP
"
:
""
,
parameters
.
lightMap
?
"
#define USE_LIGHTMAP
"
:
""
,
parameters
.
bumpMap
?
"
#define USE_BUMPMAP
"
:
""
,
parameters
.
normalMap
?
"
#define USE_NORMALMAP
"
:
""
,
parameters
.
specularMap
?
"
#define USE_SPECULARMAP
"
:
""
,
parameters
.
vertexColors
?
"
#define USE_COLOR
"
:
""
,
parameters
.
shadowMapEnabled
?
"
#define USE_SHADOWMAP
"
:
""
,
parameters
.
shadowMapEnabled
?
"
#define
"
+
shadowMapTypeDefine
:
""
,
parameters
.
shadowMapDebug
?
"
#define SHADOWMAP_DEBUG
"
:
""
,
parameters
.
shadowMapCascade
?
"
#define SHADOWMAP_CASCADE
"
:
""
,
parameters
.
metal
?
"
#define METAL
"
:
""
,
parameters
.
perPixel
?
"
#define PHONG_PER_PIXEL
"
:
""
,
parameters
.
wrapAround
?
"
#define WRAP_AROUND
"
:
""
,
parameters
.
doubleSided
?
"
#define DOUBLE_SIDED
"
:
""
,
parameters
.
flipSided
?
"
#define FLIP_SIDED
"
:
""
,
"
uniform mat4 viewMatrix;
"
,
"
uniform vec3 cameraPosition;
"
,
""
parameters
.
shadowMapEnabled
?
"
#define USE_SHADOWMAP
"
:
""
,
parameters
.
shadowMapEnabled
?
"
#define
"
+
shadowMapTypeDefine
:
""
,
parameters
.
shadowMapDebug
?
"
#define SHADOWMAP_DEBUG
"
:
""
,
parameters
.
shadowMapCascade
?
"
#define SHADOWMAP_CASCADE
"
:
""
,
].
join
(
"
\n
"
);
"
uniform mat4 viewMatrix;
"
,
"
uniform vec3 cameraPosition;
"
,
""
program
=
renderer
.
compileShader
(
prefix_vertex
+
vertexShader
,
prefix_fragment
+
fragmentShader
);
//console.log( prefix_fragment + fragmentShader );
//console.log( prefix_vertex + vertexShader );
].
join
(
"
\n
"
);
program
.
uniforms
=
{};
program
.
attributes
=
{};
program
=
renderer
.
compileShader
(
prefix_vertex
+
vertexShader
,
prefix_fragment
+
fragmentShader
);
//console.log( prefix_fragment + fragmentShader );
//console.log( prefix_vertex + vertexShader );
var
identifiers
,
u
,
a
,
i
;
program
.
uniforms
=
{};
program
.
attributes
=
{};
// cache uniform locations
var
identifiers
,
u
,
a
,
i
;
identifiers
=
[
// cache uniform locations
'
viewMatrix
'
,
'
modelViewMatrix
'
,
'
projectionMatrix
'
,
'
normalMatrix
'
,
'
modelMatrix
'
,
'
cameraPosition
'
,
'
morphTargetInfluences
'
identifiers
=
[
];
'
viewMatrix
'
,
'
modelViewMatrix
'
,
'
projectionMatrix
'
,
'
normalMatrix
'
,
'
modelMatrix
'
,
'
cameraPosition
'
,
'
morphTargetInfluences
'
if
(
parameters
.
useVertexTexture
)
{
];
identifiers
.
push
(
'
boneTexture
'
);
if
(
parameters
.
useVertexTexture
)
{
}
else
{
identifiers
.
push
(
'
boneTexture
'
);
identifiers
.
push
(
'
boneGlobalMatrices
'
);
}
else
{
}
identifiers
.
push
(
'
boneGlobalMatrices
'
);
for
(
u
in
uniforms
)
{
}
identifiers
.
push
(
u
);
for
(
u
in
uniforms
)
{
}
identifiers
.
push
(
u
);
this
.
cacheUniformLocations
(
program
,
identifiers
);
}
// cache attributes locations
this
.
cacheUniformLocations
(
program
,
identifiers
);
identifiers
=
[
// cache attributes locations
"
position
"
,
"
normal
"
,
"
uv
"
,
"
uv2
"
,
"
tangent
"
,
"
color
"
,
"
skinIndex
"
,
"
skinWeight
"
,
"
lineDistance
"
identifiers
=
[
];
"
position
"
,
"
normal
"
,
"
uv
"
,
"
uv2
"
,
"
tangent
"
,
"
color
"
,
"
skinIndex
"
,
"
skinWeight
"
,
"
lineDistance
"
for
(
i
=
0
;
i
<
parameters
.
maxMorphTargets
;
i
++
)
{
];
identifiers
.
push
(
"
morphTarget
"
+
i
);
for
(
i
=
0
;
i
<
parameters
.
maxMorphTargets
;
i
++
)
{
}
identifiers
.
push
(
"
morphTarget
"
+
i
);
for
(
i
=
0
;
i
<
parameters
.
maxMorphNormals
;
i
++
)
{
}
identifiers
.
push
(
"
morphNormal
"
+
i
);
for
(
i
=
0
;
i
<
parameters
.
maxMorphNormals
;
i
++
)
{
}
identifiers
.
push
(
"
morphNormal
"
+
i
);
for
(
a
in
attributes
)
{
}
identifiers
.
push
(
a
);
for
(
a
in
attributes
)
{
}
identifiers
.
push
(
a
);
this
.
cacheAttributeLocations
(
program
,
identifiers
);
}
this
.
cacheAttributeLocations
(
program
,
identifiers
);
program
.
id
=
this
.
programs_counter
++
;
program
.
id
=
this
.
programs_counter
++
;
this
.
programs
.
push
(
{
program
:
program
,
code
:
code
,
usedTimes
:
1
}
);
this
.
programs
.
push
(
{
program
:
program
,
code
:
code
,
usedTimes
:
1
}
);
this
.
info
.
memory
.
programs
=
this
.
programs
.
length
;
this
.
info
.
memory
.
programs
=
this
.
programs
.
length
;
return
program
;
return
program
;
};
};
THREE
.
WebGLRenderer2
.
ShaderBuilder
.
prototype
.
generateDefines
=
function
(
defines
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录