49 Commits
Author SHA1 Message Date
alteredq 89dc5b1b53 Added luminosity shader.
Dynamic terrain example now creates a specular texture from the color texture. That saves 2.17 MB download.

Just I had to drop materials pre-initialization, for some reason this doesn't play nice with having extra scene / render target :S.

In theory also detail normal texture could be computed from the color texture, just we need some nicer normal map filter (Gimp plugin has 9 different ones).
2011-11-09 23:53:32 +01:00
alteredq 5253c6490e Merge remote-tracking branch 'remotes/mrdoob/dev' into dev 2011-11-08 21:12:26 +01:00
alteredq 852738580e Added dynamic terrain example. 2011-11-08 20:54:57 +01:00
Mr.doob 81346eab80 Better UV texture 2011-11-05 14:59:17 +01:00
Mr.doob 2f90d73d13 Added Kinect example. Updated DAT.GUI. 2011-10-30 17:35:09 +01:00
Mr.doob 6b151b552e Merging with @alteredq's experimental branches. 2011-10-23 12:34:46 +02:00
alteredq 00b01e88b3 Added cars demo.
New stuff:

- car rig
- dynamic cube maps
- drop shadows from geometries
- tilt-shift
- motion blur
- fxaa

Uses shrunk lens flare texture from ro.me.
2011-09-30 00:51:45 +02:00
alteredq d4b2e4a8e0 Added color parameter to Sprite.
Also removed unused material Sprite parameter.
2011-09-17 00:36:44 +02:00
Mr.doob 714e9ec302 REVISION++
* Added support to texture.offset in CanvasRenderer
* Removed ShadowVolume, ShadowVolumeDynamicMaterial and LensFlare classes.
* Removed Stencil Shadows and LensFlare code out of WebGLRenderer
* Added 2.59 folder to Blender, and removed old ones.
2011-08-14 02:54:23 +02:00
alteredq 41b7eb7047 Added custom attributes example for billboard particles.
A test case for sorting of custom attributes.
2011-07-14 14:17:10 +02:00
alteredq 2014fb8b7f Added handling of custom attributes for ParticleSystems. 2011-07-14 01:45:30 +02:00
alteredq 22bd108ab1 Added FlyCamera (thanks to James Baicoianu). Added specular map to normal map shader. Added WebGL Earth FlyCamera demo.
Changed normal map shader to multiply specular component with diffuse weighting as specular highlights were appearing in the dark parts.

Changed camera look speed in minecraft and terrain demos, they were too fast - I guess as everything got faster with antialiasing off.

Reenabled antialiasing in few demos where it was too ugly without (basically anything with lines and without postprocessing).

Fixed again spurious invisible characters in empaempa's code (which are breaking everything and are hard to hunt as they look like spaces).
2011-04-10 23:13:05 +02:00
alteredq f7d97caf1d Merged with empaempa's branch. 2011-04-07 21:29:21 +02:00
Mikael Emtinger 50b6745ad6 Added sorting to sprites and updated example.
Removed pink square method from lens flares in opengl (no partial screen occlusion)
2011-04-07 18:03:22 +02:00
Mikael Emtinger 08127af611 Fixed blending bug with sprites. Added example. 2011-04-07 17:10:54 +02:00
Mr.doob 94790f057e extras/geometries
- Fixed TorusKnot face orientation.
- Added UVs to Cylinder (Cylindrical Mapping) 
- Fixed Lathe UVs

There is something wrong with texture mapping, u needs to be inverted all the time. Something to researching on.
2011-04-06 20:10:25 +01:00
alteredq 1001b76351 Added lava shader example. 2011-04-02 09:02:35 +02:00
Mikael Emtinger ac6f422a6f Added LensFlares. Note that a new blending mode has been added. Added an (quite ugly example). NOTE: this doesn't seem to work on Chrome+Mac+NVIDIA unless you turn off antialias (which I've done in the example). 2011-03-29 13:30:53 +02:00
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