16 Commits
Author SHA1 Message Date
Mr.doob e46346c9ba Cleaned up CanvasRenderer/MeshDepthMaterial code.
Moved near/far values from MeshDepthMaterial to Camera (CanvasRenderer/WebGLRenderer/WebGLRenderer2).
2010-12-25 18:14:10 +00:00
Mr.doob 00795b3a83 Updated CanvasRenderer and some examples to handle the Texture( image, mapping) approach. 2010-12-04 16:33:16 +00:00
Mr.doob ed5a9b91a5 Synced materials examples with live version.
Added irc channel info in README.
2010-12-02 19:14:01 +00:00
Mr.doob 2929d5a345 GeometryUtils::merge were not copying centroid/normal/material. 2010-12-02 13:40:04 +00:00
Mr.doob d29e94ca97 Updated materials (canvas) example. 2010-12-01 17:55:20 +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 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 b913baa6f0 Code clean up and minor optimisations. 2010-11-26 07:58:44 +00: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 2b92a824c2 Added FaceMaterial example in materials demo. 2010-11-17 04:56:47 +00:00
Mr.doob ec0de29153 Merging alteredq branch 2010-11-17 04:53:21 +00:00
Mr.doob 7dd33d6df6 Merging with alteredq branch 2010-11-17 04:51:43 +00:00
Mr.doob 51f91fdd03 Removed alpha component from the Color class
GouraudShading and PhongShading ⟶ SmoothShading
2010-11-17 04:49:30 +00:00
alteredq 3d3708919b Added support to "shading" materials parameter in WebGLRenderer.
This is actually tricky due to multimaterials and vertex normals.

The practical effects of "shading" parameter in WebGLRenderer are currently following:

- if your model has vertex normals, now you can "dumb down" its shading by specifying THREE.FlatShading for MeshLambertMaterial and MeshPhongMaterial
- if your model has only face normals, it will always have just flat shading, no matter which shading you set, no escape from this
- if your model has multiple materials, smooth shading always "wins", meaning if there is at least one smooth shaded material in multimaterial group, all other materials in this group will be also smooth shaded (this is solvable by having multiple normal buffers, but seems wasteful, at least for the moment, till there are no practical use cases)

Currently implemented shading / material combinations:

  - MeshNormalMaterial: FlatShading [default], GouradShading
  - MeshDepthMaterial:  no shading parameter in material, uses own specific shading
  - MeshBasicMaterial: no shading parameter in material, uses own specific shading
  - MeshLambertMaterial: FlatShading, GouraudShading [default]
  - MeshPhongMaterial: FlatShading, PhongShading [default]
2010-11-16 22:38:06 +01:00
Mr.doob f7d71abc3e Improved materials demo. 2010-11-16 17:22:37 +00:00
Mr.doob 23688daf08 Added WIP materials example (showing all at once). 2010-11-16 14:57:06 +00:00