1. 27 1月, 2011 1 次提交
  2. 24 1月, 2011 1 次提交
  3. 20 1月, 2011 1 次提交
  4. 18 1月, 2011 3 次提交
  5. 17 1月, 2011 1 次提交
  6. 16 1月, 2011 1 次提交
    • A
      Added support for "doubleSided" mesh property to WebGLRenderer. · 271ba6c5
      alteredq 提交于
      Testing on current examples didn't show any noticeable performance degradation when enabling / disabling culling for every object in every frame.
      
      "FlipSided" property could be probably done in very similar way, just setting "gl.frontFace( gl.CCW )" or "gl.frontFace( gl.CW )"
      271ba6c5
  7. 15 1月, 2011 1 次提交
    • A
      Added postprocessing example. · a03f7142
      alteredq 提交于
      For this had to extend WebGLRenderer a bit:
      
      - MeshShaderMaterial now can take non-specific float array uniforms as "fv1"
        (there is already "fv" type for array of 3-item-vectors, which probably should be renamed to "fv3" to be consistent)
      
      - render method has yet another parameter "clear" for clearing newly set framebuffer (defaults to true).
        This is a bit hackish but it seems necessary to control this somehow. I didn't manage to replicate
        desired behavior just with autoClear.
      
      - another dirty thing is accessing GL context from the application side:
          renderer.context.disable( renderer.context.DEPTH_TEST );
      
          This should be refactored somehow, wrapped in some API call.
      a03f7142
  8. 14 1月, 2011 2 次提交
    • A
      Another update of render-to-texture example and related bugfix. · 7c9fe8ff
      alteredq 提交于
      Rendering proper 3d object into the texture uncovered another issue - framebuffer had to be cleared after switching.
      
      Texture is still flipped :( (original scene has small red torus on the top)
      
      This is proving to be rather tricky. Yet again I tried to handle image coordinate mess in a proper way (UNPACK_FLIP_Y_WEBGL as texture parameter and non-inverted UVs), fixing hacks across the codebase.
      
      This did indeed help with render-to-texture flipping, but instead it created really ugly problems with both normal map and minecraft AO demos. So back to square one :(
      7c9fe8ff
    • A
      Fixed discrepancy between ANGLE and OpenGL when rendering to texture. · 9bc383e1
      alteredq 提交于
      Had to set viewport to make it work in OpenGL.
      
      Also made it easier to see texture orientation in the example.
      
      Now it's visible that there is indeed flipping. At least now it's consistent ;).
      9bc383e1
  9. 13 1月, 2011 1 次提交
  10. 12 1月, 2011 1 次提交
    • A
      Added basic support for dynamic geometry in WebGLRenderer (with silly ocean example). · fe6008b6
      alteredq 提交于
      If you want to refresh VBOs (and thus have geometry changes reflected in renderer), you need to set dirty flags on geometry object.
      
      There are separate flags for different buffers (as not always all buffers need to be updated and oh my is updating costly):
      
          mesh.geometry.__dirtyVertices = true;
          mesh.geometry.__dirtyNormals = true;
          mesh.geometry.__dirtyUvs = true;
          mesh.geometry.__dirtyTangents = true;
      
          mesh.geometry.__dirtyElements = true;
      
      That was quite tough feature, a lot of refactoring, yet performance is still quite bad :(
      
      The biggest remaining bottleneck seems to be translation between Three.js internal data formats and buffers. I removed as much per-frame arrays creation as I could, but even just iterating through existing data and setting of values is still very costly. Also per-frame normals computation is expensive.
      fe6008b6
  11. 11 1月, 2011 1 次提交
  12. 10 1月, 2011 1 次提交
  13. 09 1月, 2011 2 次提交
  14. 08 1月, 2011 1 次提交
  15. 06 1月, 2011 1 次提交
  16. 04 1月, 2011 1 次提交
    • A
      Added crude lines support to WebGLRenderer. · 548c3315
      alteredq 提交于
      As expected, performance of one-to-one conversion from CanvasRenderer was horrible, so I had to change a bit how lines are handled.
      
      Line object now has "type" property:
      
          - default type is "THREE.LineContinuous" which should behave as before: geometry represents one continuous line (v0 ... vn)
      
          - new option is "THREE.LinePieces" which tells renderer that geometry represents collection of individual line segments (v0,v1) ... (vn-1, vn)
      
      (one Line object corresponds to one VBO)
      
      (same limitations as with meshes - once VBO is baked, no changes are possible except object transforms - scale / rotation / position)
      548c3315
  17. 03 1月, 2011 1 次提交
  18. 31 12月, 2010 2 次提交
  19. 30 12月, 2010 4 次提交
  20. 29 12月, 2010 2 次提交
    • A
      Moved MeshBasicMaterial out of ubershader. · 3cabd118
      alteredq 提交于
      None of the demos seem to be slower, some are noticeably faster (especially terrain).
      
      I suspect biggest performance gain comes from conditional include of environment mapping: if it's not used, it doesn't go into shader at all.
      3cabd118
    • A
      Refactored uniforms cloning into separate file so that it can be reused also... · 0fe464c9
      alteredq 提交于
      Refactored uniforms cloning into separate file so that it can be reused also for MeshShaderMaterials.
      
      Also changed MeshShaderMaterial demos to show how to use cloning. For these particular demos uniforms cloning is not really necessary as they use only one instance of shader material, but for example, if there were two normal mapped models in one scene, each model would need separate material with own uniforms.
      0fe464c9
  21. 28 12月, 2010 1 次提交
  22. 27 12月, 2010 1 次提交
  23. 26 12月, 2010 3 次提交
    • A
      Resurrected exponential fog as FogExp2. · fb7788f0
      alteredq 提交于
      For the moment, only one type of fog is baked into shader, depending on scene.fog initial value.
      
      If use case arise for dynamic fog type switching, this could be changed, though than both fogs would need to be computed all the time :S.
      fb7788f0
    • A
      Added clear color parameter to WebGLRenderer constructor, also added setClearColor API call. · 255c042b
      alteredq 提交于
      This allows to work around ANGLE antialiasing issue appearing when compositing WebGL framebuffer with transparent background color with HTML canvas element background (while keeping antialiasing on).
      
      WebGLRenderer constructor now takes JSON object with few optional parameters:
      
          renderer = new THREE.WebGLRenderer { scene: scene,
                                               antialias: true,
                                               clearColor: 0x000000,
                                               clearAlpha: 0 };
      
      Here is how to change clear color in runtime:
      
          renderer.setClearColor( 0xff0000, 1 );
      255c042b
    • M
      Cleaned up CanvasRenderer/MeshDepthMaterial code. · e46346c9
      Mr.doob 提交于
      Moved near/far values from MeshDepthMaterial to Camera (CanvasRenderer/WebGLRenderer/WebGLRenderer2).
      e46346c9
  24. 25 12月, 2010 2 次提交
  25. 24 12月, 2010 1 次提交
    • A
      Added antialiasing parameter to WebGLRenderer constructor. · 323228ac
      alteredq 提交于
      This is a workaround for Chrome ANGLE antialiasing issue manifested in geometry_terrain_fog demo:
      
      http://twitpic.com/3iftyh
      
      Problem happens in Chrome ANGLE when geometry is rendered with the same color as canvas background - then instead of expected nothing to be seen, there is a faint white outline at geometry borders.
      
      This issue is not specific to fog, even just rendering geometry with MeshBasicMaterial having the same color as background produces the same outline.
      
      TODO: create isolated test case and file ANGLE / Chromium bug.
      323228ac
  26. 21 12月, 2010 3 次提交