提交 47d61161 编写于 作者: M Mr.doob

Merging with alteredq's branch.

上级 b96de35c
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -466,7 +466,7 @@
if ( ! CARS[ car ].object ) {
$( "status" ).style.display = "block";
loader.statusDomElement.style.display = "block";
loader.loadBinary( CARS[ car ].url, function( geometry ) { createScene( geometry, car ) }, CARS[ car ].path );
} else {
......
......@@ -37,13 +37,7 @@ var ShaderUtils = {
"attribute vec3 position;",
"attribute vec3 normal;",
"attribute vec3 uv;",
"uniform mat4 objMatrix;",
"uniform mat4 modelViewMatrix;",
"uniform mat4 projectionMatrix;",
"uniform vec3 cameraPosition;",
"attribute vec3 uv;",
"uniform float mRefractionRatio;",
"uniform float mFresnelBias;",
......@@ -56,9 +50,9 @@ var ShaderUtils = {
"void main(void) {",
"vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );",
"vec4 mPosition = objMatrix * vec4( position, 1.0 );",
"vec4 mPosition = objectMatrix * vec4( position, 1.0 );",
"vec3 nWorld = normalize ( mat3( objMatrix[0].xyz, objMatrix[1].xyz, objMatrix[2].xyz ) * normal );",
"vec3 nWorld = normalize ( mat3( objectMatrix[0].xyz, objectMatrix[1].xyz, objectMatrix[2].xyz ) * normal );",
"vec3 I = mPosition.xyz - cameraPosition;",
......
......@@ -4,7 +4,7 @@
* parameters = {
* fragment_shader: <string>,
* vertex_shader: <string>,
* uniforms: [ "parameter1": value1, "parameter2": value2 ],
* uniforms: { "parameter1": { type: "f", value: 1.0 }, "parameter2": { type: "i" value2: 2 } },
* shading: THREE.SmoothShading,
* blending: THREE.NormalBlending,
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册