Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
d621fa9a
T
three.js
项目概览
车家大少爷
/
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,发现更多精彩内容 >>
提交
d621fa9a
编写于
4月 11, 2016
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
95bfc2a5
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
52 addition
and
71 deletion
+52
-71
build/three.js
build/three.js
+5
-20
build/three.min.js
build/three.min.js
+47
-51
未找到文件。
build/three.js
浏览文件 @
d621fa9a
...
@@ -333,12 +333,6 @@ THREE.RGBM7Encoding = 3004;
...
@@ -333,12 +333,6 @@ THREE.RGBM7Encoding = 3004;
THREE.RGBM16Encoding = 3005;
THREE.RGBM16Encoding = 3005;
THREE.RGBDEncoding = 3006; // MaxRange is 256.
THREE.RGBDEncoding = 3006; // MaxRange is 256.
// Depth format
THREE.AutoDepthFormat = 3100; // switches based on camera type, uses gl_FragCoord.z
THREE.LinearClipZDepthFormat = 3101; // used by orthographic cameras
THREE.InvClipZDepthFormat = 3102; // used by perspective cameras
// Depth packing strategies
// Depth packing strategies
THREE.LinearDepthPacking = 3200; // for writing to float textures for high precision or for visualizing results in RGB buffers
THREE.LinearDepthPacking = 3200; // for writing to float textures for high precision or for visualizing results in RGB buffers
...
@@ -20915,7 +20909,6 @@ THREE.MeshDepthMaterial = function ( parameters ) {
...
@@ -20915,7 +20909,6 @@ THREE.MeshDepthMaterial = function ( parameters ) {
this.type = 'MeshDepthMaterial';
this.type = 'MeshDepthMaterial';
this.depthFormat = THREE.AutoDepthFormat;
this.depthPacking = THREE.LinearDepthPacking;
this.depthPacking = THREE.LinearDepthPacking;
this.skinning = false;
this.skinning = false;
...
@@ -20939,7 +20932,6 @@ THREE.MeshDepthMaterial.prototype.copy = function ( source ) {
...
@@ -20939,7 +20932,6 @@ THREE.MeshDepthMaterial.prototype.copy = function ( source ) {
THREE.Material.prototype.copy.call( this, source );
THREE.Material.prototype.copy.call( this, source );
this.depthFormat = source.depthFormat;
this.depthPacking = source.depthPacking;
this.depthPacking = source.depthPacking;
this.skinning = source.skinning;
this.skinning = source.skinning;
...
@@ -24098,7 +24090,7 @@ THREE.ShaderChunk[ 'normalmap_pars_fragment' ] = "#ifdef USE_NORMALMAP\n uniform
...
@@ -24098,7 +24090,7 @@ THREE.ShaderChunk[ 'normalmap_pars_fragment' ] = "#ifdef USE_NORMALMAP\n uniform
// File:src/renderers/shaders/ShaderChunk/packing.glsl
// File:src/renderers/shaders/ShaderChunk/packing.glsl
THREE.ShaderChunk[ 'packing' ] = "vec3 packNormalToRGB( const in vec3 normal ) {\n return normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n return 1.0 - 2.0 * rgb.xyz;\n}\nvec4 packLinearUnitToRGBA( const in float value ) {\n const vec4 bit_shift = vec4( 256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0 );\n const vec4 bit_mask = vec4( 0.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0 );\n vec4 res = mod( value * bit_shift * vec4( 255 ), vec4( 256 ) ) / vec4( 255 );\n res -= res.xxyz * bit_mask;\n return res;\n}\nfloat unpackRGBAToLinearUnit( const in vec4 rgba ) {\n const vec4 bitSh = vec4( 1.0 / ( 256.0 * 256.0 * 256.0 ), 1.0 / ( 256.0 * 256.0 ), 1.0 / 256.0, 1.0 );\n return dot( rgba, bitSh );\n}\nfloat viewZTo
LinearClipZ( const in float viewZ, const in float near, const in float far ) {\n return ( viewZ + near ) / ( near - far );\n}\nfloat linearClipZToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n return linearClipZ * ( near - far ) - near;\n}\nfloat viewZToInvClipZ( const in float viewZ, const in float near, const in float far ) {\n return (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat invClipZ
ToViewZ( const in float invClipZ, const in float near, const in float far ) {\n return ( near * far ) / ( ( far - near ) * invClipZ - far );\n}\n";
THREE.ShaderChunk[ 'packing' ] = "vec3 packNormalToRGB( const in vec3 normal ) {\n return normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n return 1.0 - 2.0 * rgb.xyz;\n}\nvec4 packLinearUnitToRGBA( const in float value ) {\n const vec4 bit_shift = vec4( 256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0 );\n const vec4 bit_mask = vec4( 0.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0 );\n vec4 res = mod( value * bit_shift * vec4( 255 ), vec4( 256 ) ) / vec4( 255 );\n res -= res.xxyz * bit_mask;\n return res;\n}\nfloat unpackRGBAToLinearUnit( const in vec4 rgba ) {\n const vec4 bitSh = vec4( 1.0 / ( 256.0 * 256.0 * 256.0 ), 1.0 / ( 256.0 * 256.0 ), 1.0 / 256.0, 1.0 );\n return dot( rgba, bitSh );\n}\nfloat viewZTo
OrthoDepth( const in float viewZ, const in float near, const in float far ) {\n return ( viewZ + near ) / ( near - far );\n}\nfloat OrthoDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n return linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n return (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepth
ToViewZ( const in float invClipZ, const in float near, const in float far ) {\n return ( near * far ) / ( ( far - near ) * invClipZ - far );\n}\n";
// File:src/renderers/shaders/ShaderChunk/premultiplied_alpha_fragment.glsl
// File:src/renderers/shaders/ShaderChunk/premultiplied_alpha_fragment.glsl
...
@@ -24432,11 +24424,11 @@ THREE.ShaderChunk[ 'cube_vert' ] = "varying vec3 vWorldPosition;\n#include <comm
...
@@ -24432,11 +24424,11 @@ THREE.ShaderChunk[ 'cube_vert' ] = "varying vec3 vWorldPosition;\n#include <comm
// File:src/renderers/shaders/ShaderLib/depth_frag.glsl
// File:src/renderers/shaders/ShaderLib/depth_frag.glsl
THREE.ShaderChunk[ 'depth_frag' ] = "#if DEPTH_
FORMAT != 3100\n uniform float mNear;\n uniform float mFar;\n#endif\n#if DEPTH_PACKING == 3200\n uniform float opacity;\n#endif\n#if DEPTH_FORMAT != 3100\n varying float vViewZDepth;\n#endif\n#include <common>\n#include <packing>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n #include <logdepthbuf_fragment>\n float transformedDepth = 0.0;\n #if DEPTH_FORMAT == 3100\n transformedDepth = gl_FragCoord.z;\n #elif DEPTH_FORMAT == 3101\n transformedDepth = viewZToLinearClipZ( vViewZDepth, mNear, mFar );\n #elif DEPTH_FORMAT == 3102\n transformedDepth = viewZToInvClipZ( vViewZDepth, mNear, mFar );\n #endif\n #if DEPTH_PACKING == 3200\n gl_FragColor = vec4( vec3( transformedDepth ), opacity );\n #elif DEPTH_PACKING == 3201\n gl_FragColor = packLinearUnitToRGBA( transformedDepth
);\n #endif\n}\n";
THREE.ShaderChunk[ 'depth_frag' ] = "#if DEPTH_
PACKING == 3200\n uniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n #include <logdepthbuf_fragment>\n #if DEPTH_PACKING == 3200\n gl_FragColor = vec4( vec3( gl_FragCoord.z ), opacity );\n #elif DEPTH_PACKING == 3201\n gl_FragColor = packLinearUnitToRGBA( gl_FragCoord.z
);\n #endif\n}\n";
// File:src/renderers/shaders/ShaderLib/depth_vert.glsl
// File:src/renderers/shaders/ShaderLib/depth_vert.glsl
THREE.ShaderChunk[ 'depth_vert' ] = "#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n
#if DEPTH_FORMAT != 3100\n varying float vViewZDepth;\n#endif\nvoid main() {\n #include <uv_vertex>\n #include <skinbase_vertex>\n #include <begin_vertex>\n #include <displacementmap_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #if DEPTH_FORMAT != 3100\n vViewZDepth = mvPosition.z;\n #endif
\n}\n";
THREE.ShaderChunk[ 'depth_vert' ] = "#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n
void main() {\n #include <uv_vertex>\n #include <skinbase_vertex>\n #include <begin_vertex>\n #include <displacementmap_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>
\n}\n";
// File:src/renderers/shaders/ShaderLib/distanceRGBA_frag.glsl
// File:src/renderers/shaders/ShaderLib/distanceRGBA_frag.glsl
...
@@ -26766,8 +26758,6 @@ THREE.WebGLRenderer = function ( parameters ) {
...
@@ -26766,8 +26758,6 @@ THREE.WebGLRenderer = function ( parameters ) {
} else if ( material instanceof THREE.MeshDepthMaterial ) {
} else if ( material instanceof THREE.MeshDepthMaterial ) {
m_uniforms.mNear.value = camera.near;
m_uniforms.mFar.value = camera.far;
m_uniforms.opacity.value = material.opacity;
m_uniforms.opacity.value = material.opacity;
if ( material.displacementMap ) {
if ( material.displacementMap ) {
...
@@ -29968,8 +29958,6 @@ THREE.WebGLProgram = ( function () {
...
@@ -29968,8 +29958,6 @@ THREE.WebGLProgram = ( function () {
parameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '',
parameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '',
parameters.logarithmicDepthBuffer && renderer.extensions.get( 'EXT_frag_depth' ) ? '#define USE_LOGDEPTHBUF_EXT' : '',
parameters.logarithmicDepthBuffer && renderer.extensions.get( 'EXT_frag_depth' ) ? '#define USE_LOGDEPTHBUF_EXT' : '',
parameters.depthFormat ? "#define DEPTH_FORMAT " + material.depthFormat : '',
'uniform mat4 modelMatrix;',
'uniform mat4 modelMatrix;',
'uniform mat4 modelViewMatrix;',
'uniform mat4 modelViewMatrix;',
'uniform mat4 projectionMatrix;',
'uniform mat4 projectionMatrix;',
...
@@ -30090,7 +30078,6 @@ THREE.WebGLProgram = ( function () {
...
@@ -30090,7 +30078,6 @@ THREE.WebGLProgram = ( function () {
parameters.outputEncoding ? getTexelEncodingFunction( "linearToOutputTexel", parameters.outputEncoding ) : '',
parameters.outputEncoding ? getTexelEncodingFunction( "linearToOutputTexel", parameters.outputEncoding ) : '',
parameters.depthPacking ? "#define DEPTH_PACKING " + material.depthPacking : '',
parameters.depthPacking ? "#define DEPTH_PACKING " + material.depthPacking : '',
parameters.depthFormat ? "#define DEPTH_FORMAT " + material.depthFormat : '',
'\n'
'\n'
...
@@ -30306,7 +30293,7 @@ THREE.WebGLPrograms = function ( renderer, capabilities ) {
...
@@ -30306,7 +30293,7 @@ THREE.WebGLPrograms = function ( renderer, capabilities ) {
"maxMorphTargets", "maxMorphNormals", "premultipliedAlpha",
"maxMorphTargets", "maxMorphNormals", "premultipliedAlpha",
"numDirLights", "numPointLights", "numSpotLights", "numHemiLights",
"numDirLights", "numPointLights", "numSpotLights", "numHemiLights",
"shadowMapEnabled", "shadowMapType", "toneMapping", 'physicallyCorrectLights',
"shadowMapEnabled", "shadowMapType", "toneMapping", 'physicallyCorrectLights',
"alphaTest", "doubleSided", "flipSided", "numClippingPlanes", "depthPacking"
, "depthFormat"
"alphaTest", "doubleSided", "flipSided", "numClippingPlanes", "depthPacking"
];
];
...
@@ -30465,8 +30452,7 @@ THREE.WebGLPrograms = function ( renderer, capabilities ) {
...
@@ -30465,8 +30452,7 @@ THREE.WebGLPrograms = function ( renderer, capabilities ) {
doubleSided: material.side === THREE.DoubleSide,
doubleSided: material.side === THREE.DoubleSide,
flipSided: material.side === THREE.BackSide,
flipSided: material.side === THREE.BackSide,
depthPacking: ( material.depthPacking !== undefined ) ? material.depthPacking : false,
depthPacking: ( material.depthPacking !== undefined ) ? material.depthPacking : false
depthFormat: ( material.depthFormat !== undefined ) ? material.depthFormat : false
};
};
...
@@ -30699,7 +30685,6 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
...
@@ -30699,7 +30685,6 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
// init
// init
var depthMaterialTemplate = new THREE.MeshDepthMaterial();
var depthMaterialTemplate = new THREE.MeshDepthMaterial();
depthMaterialTemplate.depthFormat = THREE.AutoDepthFormat;
depthMaterialTemplate.depthPacking = THREE.RGBADepthPacking;
depthMaterialTemplate.depthPacking = THREE.RGBADepthPacking;
depthMaterialTemplate.clipping = true;
depthMaterialTemplate.clipping = true;
...
...
build/three.min.js
浏览文件 @
d621fa9a
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录