Commit Graph
31 Commits
Author SHA1 Message Date
Mr.doob 0cb62b71ae Added WebGL equirectangular panorama demo.
Merging with alteredq's branch.
2011-03-21 19:05:12 +00:00
alteredq 2c996815be Refactored texture updating, added texture filtering example and fixed scene loader and example. 2011-03-06 06:01:40 +01:00
alteredq d34d8d8e05 Vertex colors examples tweaks. 2011-02-12 02:00:33 +01:00
alteredq fc9d5bc83e Ported voxel painter demo to work with WebGLRenderer. 2011-02-08 18:23:40 +01:00
alteredq 8227d9f118 Added billboard particles (semi-opaque depth sorted).
Work in progress, caveats:

- sort happens just inside one ParticleSystems, so everything gets messed up when more ParticleSystems are in the same screen space
- not yet solved proper order of operations, if you change object transform, you need to update ParticleSystem object matrix manually before rendering (so that sort works, otherwise it will use transform from previous frame)

Also fixed transparency in fog and did small optimizations in WebGLRenderer.
2011-02-03 02:53:33 +01:00
alteredq 74fe85f7ef Added particle sprites WebGL example. 2011-02-01 19:59:18 +01:00
alteredq 8f133abd30 Added HDR texture example. 2011-01-23 18:39:14 +01:00
Mr.doob 28e18bcf2c Added texture/disturb.jpg 2011-01-17 00:00:38 +00:00
alteredq fe6008b616 Added basic support for dynamic geometry in WebGLRenderer (with silly ocean example).
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.
2011-01-12 00:57:04 +01:00
alteredq ac5276b41f Added normal + ambient occlusion + displacement mapping demo.
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
2010-12-09 12:27:49 +01:00
Mr.doob 6f898f9fba Updated texture pack for Minecraft demo. 2010-12-06 13:14:22 +00:00
Mr.doob 12ce3e945b Added minecraft demo. 2010-12-06 12:21:34 +00:00
Mr.doob fecd2f3a39 python build.py --includes generate a includes.js for easy copy/pasting
TODO: Would be nice if `buildIncludes()` would reuse `buildCommon()` array.
2010-12-06 06:29:05 +00:00
Mr.doob 69f3072e05 Added canvas spherical reflection demo.
Need to test this on IE9... :)_
2010-12-03 16:37:43 +00:00
Mr.doob 1d7a14733b ReflectionMapping working with MeshBasicMaterial/CanvasRenderer \:D/
TODO: Add computeVertexNormals on geometry so any object can use it.
2010-12-01 17:49:02 +00:00
Mr.doob 7441b1de59 Implemented gero3's Matrix4.transformVector3 optimisation ( http://jsperf.com/diff-in-speed-for-three-js ). 2010-12-01 16:00:13 +00:00
Mr.doob 75c4276df9 examples folder clean up. 2010-11-30 17:43:52 +00:00
Mr.doob 67250c69d9 Merging with alteredq's branch. 2010-11-30 05:06:46 +00:00
Mr.doob a2acf0b390 CanvasRenderer/SVGRenderer: RenderableFace4 is now gone. Unfortunately it created more problems than it solved.
CanvasRenderer now with ShadingSmooth, or something along the lines...
2010-11-27 11:30:01 +00:00
Mr.doob 8e8dfe2d01 Tweaked cars demo a bit. 2010-11-24 23:55:34 +00:00
alteredq b409e5b04e Proper merge with mrdoob's branch.
All cube mapping examples should work and be consistent between MeshCubeMaterial and 6 texture versions.
2010-11-22 14:13:41 +01:00
Mr.doob a1d014c110 Cube.js matching WebGLRenderer cubemap. 2010-11-22 11:45:42 +00:00
Mr.doob 7b0039ec95 Cube: Swapped Top/Bottom with Front/Back.
Trying to get to the same order of alteredq's cubemap.
2010-11-21 01:38:12 +00:00
alteredq 946cc6a26c And refraction /reflection cube mapping is fixed. Also added two new examples for refraction.
Fix is a bit dirty, but at least it's short ;)
2010-11-20 05:20:19 +01:00
alteredq 1c6be1c70b Added second cube mapping example.
Also refactored a bit texture cube code, to make it easier to reuse.
2010-11-19 00:12:32 +01:00
alteredq 3ee99dc4c5 Added cube mapping to WebGLRenderer. Also added cube map example. Finally ;)
TODO:

  - maybe image array loader should go into TextureCube.js so that people could just reuse the code

  - it may be worth to be able to specify different combination of environment map and underlying material (in single render pass),
    currently color/color map/environment map are multiplied, though addition also produces very interesting looking materials
2010-11-18 02:00:11 +01:00
Mr.doob fbbb78446d - Shadow texture for Earth demo 2010-07-19 13:34:49 +01:00
Mr.doob a7bed157a3 - Added Sphere primitive
- `three_debug.js` checks for broken UVs and display these faces with pink color instead
2010-07-19 13:23:06 +01:00
Mr.doob 3755d003f0 - Using .ogv instead of .ogg for clarity. Although it gives mime-type issues... 2010-06-12 00:32:12 +01:00
Mr.doob ecdf342361 - Added support to Theora only browsers on the materials_video example. 2010-06-11 18:57:10 +01:00
Mr.doob 4af8f5406b - Fixed opacity being set to zero when null
- Added (mandatory) video example
- Restructured examples folder
2010-06-11 03:14:56 +01:00