1. 01 2月, 2011 1 次提交
    • A
      Added elementary support for particles to WebGLRenderer. · 54e3bc61
      alteredq 提交于
      It works more or less the same as lines:
      
        - particles are passed to ParticleSystem object as geometry
        - material is ParticleBasicMaterial (textures should be supported, not tested yet)
        - geometry can be updated by setting "__dirtyVertices" property of the geometry
      54e3bc61
  2. 29 1月, 2011 1 次提交
  3. 28 1月, 2011 3 次提交
  4. 27 1月, 2011 4 次提交
  5. 26 1月, 2011 1 次提交
  6. 24 1月, 2011 1 次提交
  7. 19 1月, 2011 1 次提交
  8. 18 1月, 2011 8 次提交
  9. 17 1月, 2011 2 次提交
    • A
      Small optimizations to matrix math. · 08f6ceef
      alteredq 提交于
      For the moment just things that are executed every frame in WebGLRenderer.render.
      
      Continuing with quest to minimize creation of new data structures. Should instead create per class/object structures and just reuse them (as gman does in ThreeD). Main goal is to avoid annoying garbage collection pauses.
      
      Let's hope it didn't break something (could be if some code was dependent on cloning of return values of "flatten" or "makeInvert3x3", though from what I checked these are just used to set typed arrays uniforms).
      08f6ceef
    • A
      Added support for `flipSided` mesh property to WebGLRenderer. · d110c49c
      alteredq 提交于
      Also doesn't seem to decrease performance so far (though most of demos have small number of objects).
      d110c49c
  10. 16 1月, 2011 2 次提交
  11. 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
  12. 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
  13. 13 1月, 2011 1 次提交
  14. 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
  15. 11 1月, 2011 1 次提交
  16. 09 1月, 2011 2 次提交
  17. 08 1月, 2011 1 次提交
  18. 06 1月, 2011 1 次提交
  19. 04 1月, 2011 2 次提交
    • A
      Refactored lines grid in materials_gl example. · 8ea0f276
      alteredq 提交于
      8ea0f276
    • 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
  20. 03 1月, 2011 2 次提交
  21. 01 1月, 2011 1 次提交
  22. 31 12月, 2010 1 次提交