1. 09 12月, 2010 1 次提交
    • A
      Added normal + ambient occlusion + displacement mapping demo. · ac5276b4
      alteredq 提交于
      A lot of things going on in this commit:
      
      - added tangents computation for geometries
          - mesh must have UV coordinates
          - to be called explicitly once geometry is loaded like this: geometry.computeTangents()
          - tangents are stored in Vertex objects
          - quads are not solved properly (though workaround hack seems to work at least somehow, as far as each vertex appears at least somewhere)
      
      - extended VBOs in WebGLRenderer to include tangent streams (when available)
      
      - added "normal" shader to ShaderUtils (to be used with MeshShaderMaterial)
         - Blinn-Phong with one directional and one point light (7 varyings gone, just one spare)
         - normal maps are in tangent space
         - displacement maps use simple luminance value (could be changed if better precision is needed)
      
      - displacement mapping uses vertex texture fetch
          - this requires GPU with Shader Model 3.0
          - not currently supported in ANGLE
          - for this, added "supportsVertexTextures" method to WebGLRenderer API, so that application can handle this
      ac5276b4
  2. 08 12月, 2010 1 次提交
  3. 06 12月, 2010 5 次提交
  4. 05 12月, 2010 2 次提交
  5. 04 12月, 2010 2 次提交
  6. 03 12月, 2010 3 次提交
    • A
      Fixed bug(s) causing broken Fresnel demo. · a1d68ddb
      alteredq 提交于
      As suspected, this was caused by incorrect shader state management when switching between multiple shaders (thanks Firefox for verbose warnings).
      
      Also, testing WebGL performance is very tricky. You can get different performance depending on the state of browsers / system (messed up state can be 10-66% slower):
      
      1. freshly started Chrome can be much faster than Chrome that already ran few WebGL demos (which are now closed)
      2. demo opened in new Chrome tab can be faster than demo reloaded in the same tab
      3. even demos opened and closed in Firefox can slow down Chrome demos
      
      This suggests that browsers do not clean GPU state properly :(
      a1d68ddb
    • M
      Merging with alteredq's branch. · 584a8440
      Mr.doob 提交于
      584a8440
    • M
      Matrix4.transformVector3 ⟶ Matrix4.multiplyVector3 · 59304d8a
      Mr.doob 提交于
      Matrix4.transformVector4 ⟶ Matrix4.multiplyVector4
      59304d8a
  7. 02 12月, 2010 5 次提交
  8. 01 12月, 2010 11 次提交
  9. 30 11月, 2010 3 次提交
    • M
      Merging with alteredq's branch. · 67250c69
      Mr.doob 提交于
      67250c69
    • A
      Moved binary files load progress reporting to Loader.js. Added load progress... · d502ccef
      alteredq 提交于
      Moved binary files load progress reporting to Loader.js. Added load progress reporting to demos with larger meshes.
      
      To be used like this:
      
          var loader = new THREE.Loader( true );
          container.appendChild( loader.statusDomElement );
      
          loader.loadBinary( url, function( geometry ) { createScene( geometry ) }, path );
      
          function createScene( geometry ) {
              ...
      
              loader.statusDomElement.style.display = "none";
      
          }
      d502ccef
    • A
      Added MeshShaderMaterial (and Fresnel shader as its first example). · 45b3ceb7
      alteredq 提交于
      MeshShaderMaterial is still work in progress, expect changes.
      
      Nice side effect of WebGLRenderer refactoring: optimized one significant bottleneck (with noticeable effect on framerate in some demos), typed arrays corresponding to matrix uniforms are now set (instead of being created anew in each frame).
      
      Also created fully full build, with all extras included. This helps with deployment, especially when multiple versions of Three have to coexist in the same folder structure (got burned on this few times already).
      45b3ceb7