Commit Graph
340 Commits
Author SHA1 Message Date
alteredq 7355c2b68b Changed ambient term to influence also texture in Phong / normal map materials.
This feels more intuitive, otherwise ambiently lit textured surfaces look weird.
2011-10-07 19:06:55 +02:00
alteredq 7d2805dd83 Fixed specular term in Phong / normal map materials.
Turns out I had it right before after all: to get rid of artefacts it should be multiplied by diffuse term (instead of being patched by conditional).
2011-10-07 18:43:00 +02:00
Mr.doob 3343729ad0 Updated builds. 2011-10-07 09:03:57 +02:00
Mr.doob 1258e8a771 Ray now also checks object's children. 2011-10-07 07:07:34 +02:00
Mr.doob 435f7e7be5 Backwards compatibility for old cameras. 2011-10-07 01:08:59 +02:00
Mr.doob fdf6fab7e6 Including @alteredq's post-release normal map improvements into r45. 2011-10-06 23:58:20 +02:00
alteredq 88d54b0cfa Updated builds. 2011-10-06 23:46:51 +02:00
alteredq b18a38eee5 Merge remote-tracking branch 'remotes/mrdoob/dev' into dev 2011-10-06 23:44:10 +02:00
alteredq 84ed1835ca Added reflection to normal map shader. 2011-10-06 23:33:01 +02:00
Mr.doob f357225c2d Merging dev branch. 2011-10-06 06:15:03 +02:00
alteredq 8afaef4597 Merge remote-tracking branch 'remotes/mrdoob/dev' into dev 2011-10-06 04:18:27 +02:00
alteredq 8153982ffb Added shadow maps handling to normal map shader. 2011-10-06 03:46:42 +02:00
Mr.doob 1a48b52540 Added @zz85's setLens() method to PerspectiveCamera too. 2011-10-06 03:24:31 +02:00
Mr.doob 4360c07273 Updated builds. 2011-10-06 02:51:48 +02:00
Mr.doob 3678dc63fa Merging with @alteredq's branch. 2011-10-06 02:46:29 +02:00
Mr.doob c89e3fe49a More breakage...
* Added `scene.ambientColor` and `Scene` now ignores `AmbientLights` (transferring hex for temporal backwards compatibility)
* CanvasRenderer and SVGRenderer using `scene.ambientColor`. Tried to update `WebGLRenderer` too, but the method in question doesn't seem to have access to the scene :S
* Removed `scene.origin` and updated examples that used it.
* Improved subdivision example
2011-10-05 07:26:29 +02:00
alteredq c07919529e Made FirstPersonControls work. Fixed more examples to work with the new camera system. 2011-10-04 21:10:20 +02:00
Mr.doob a0b8f50fb0 Renamed scene.center to scene.origin as per @pyrotechnick suggestion. 2011-10-04 03:07:07 +02:00
Mr.doob 0995bc43f3 Added a handy "center" to Scene.
I could have just used `lookAt( scene.position )`, but eventually I would like to have Scene not extending Object3D.
2011-10-04 01:30:00 +02:00
Mr.doob 5d96f15b39 Started doing Camera changes.
* Camera is now a base object. PerspectiveCamera should be used instead. Figured out a way to show a warning when misused.
* OrthoCamera is now OrthographicCamera.
* Removed `target` from Camera.

Misc
* Renamed Trident to Axes.
2011-10-04 01:07:24 +02:00
alteredq 1f61a03593 Merge remote-tracking branch 'remotes/mrdoob/dev' into dev 2011-10-02 00:43:30 +02:00
alteredq f26eed4b1e Merge remote-tracking branch 'remotes/mrdoob/dev' into dev 2011-10-02 00:09:37 +02:00
Mr.doob 25d6480cf6 Fixed yet more examples. 2011-10-02 00:08:40 +02:00
Mr.doob 99713c72ae Fixed some more examples. 2011-10-01 23:27:54 +02:00
alteredq e63d5bae2b Merge remote-tracking branch 'remotes/mrdoob/dev' into dev 2011-10-01 23:17:48 +02:00
Mr.doob 7700feb538 WebGLRenderer .autoClear*
Implemented .autoClearColor .autoClearDepth .autoClearStencil as per @alteredq's suggestion at #587.
2011-10-01 22:46:56 +02:00
Mr.doob b87bfc71c8 Bunch of changes...
* Camera.useTarget is now false by default. Updated some of the examples. I tried to remove target altogether (and use lookAt every frame), but I found that WebGLRenderer's ShadowMaps uses a camera with target. Will try again at some point.
* Object3D.lookAt now checks if it's a Camera and does the inverted view.
* Quaternion glitch reported at #595
* Added .name to Material
* WebGLRenderer .clear() to .clear( color, depth, stencil ). All of them true by default.
2011-10-01 22:36:05 +02:00
alteredq 4f73052bc0 Updated builds. 2011-10-01 22:35:56 +02:00
alteredq f43d6a3cd1 Merge remote-tracking branch 'remotes/mrdoob/dev' into dev 2011-09-26 21:40:51 +02:00
alteredq d275bee331 Optimized attributes updates.
Finally 60 fps on 5,000 monkeys ;)

All examples should work.
2011-09-26 21:36:21 +02:00
Mr.doob d376e7ae3b Updated builds. 2011-09-26 17:34:38 +01:00
alteredq ba75a48a2b Optimized uniforms updates.
Should not refresh anything if material doesn't change for several objects in a row (in a single frame).

Hope this didn't break something, I remember this being tricky. Went through examples and they seem to work ok, gained some fps in performance test.

Also disabled sorting in depth-of-field example for some more fps gain.

Still didn't figure out the original reason for recent fps drop in performance / dof examples :/
2011-09-26 15:55:05 +02:00
alteredq 4d34149ab1 Optimized iteration over uniforms in WebGLRenderer.
Similarly like for geometry groups, iterating over object properties turned out to be bottleneck for some use cases: gained 5-10 fps in depth-of-field example (which btw for some reason got slower recently).
2011-09-26 04:45:37 +02:00
alteredq db78ffe003 Some more Math.PI instead of magic numbers. 2011-09-25 20:19:08 +02:00
Mr.doob 0076362b75 Updated builds. 2011-09-24 14:12:53 -07:00
alteredq 00b8d0613c Skipping invisible sprites. 2011-09-24 19:38:07 +02:00
alteredq 8bd87ff444 Rewritten lighting shaders.
Hopefully this fixes several problems:

- ambient component not modulated by scene ambient light
- specular component not getting light colors
- unnecessary opacity use in lighting calculations
- unnecessary vertex shader light computation for Phong
- unnecessary use of one varying in Phong
2011-09-24 10:45:57 +02:00
Mr.doob f13189b6e4 Refactored WebGLShaders a bit. 2011-09-23 16:44:34 -07:00
Mr.doob 671b5079bb WebGLRenderer: MeshPhongMaterial was overriding the alpha chanel of textures. 2011-09-23 16:33:57 -07:00
Mr.doob 9441e74abc Implemented @pyrotechnick's array concat replacement. 2011-09-23 13:31:19 -07:00
Mr.doob d7c99de542 Updated builds. 2011-09-21 13:40:11 -07:00
alteredq fd0fb85c8e Fixed specular light vs black texture bug in Phong shader. 2011-09-21 20:47:57 +02:00
alteredq 84b0f89ad4 Removed shaders that aren't used anymore. 2011-09-21 06:00:29 +02:00
alteredq 631a5d697c Changed remaining "addXXX" to "add".
Hopefully no more deprecation warnings.
2011-09-21 05:52:59 +02:00
Mr.doob 17547a2ea0 Changed addChild()s to add()s in ColladaLoader.
Cleaned up some more examples.
2011-09-20 17:54:57 -07:00
alteredq d2a3122be1 Fixed Sprites to use "object.visible" 2011-09-20 22:18:47 +02:00
alteredq 58e272f66f Fixed couple of runaway globals in WebGLRenderer. 2011-09-20 21:56:21 +02:00
alteredq 5e4b62ac08 Some whitespace cleanup in ColladaLoader. 2011-09-20 18:20:55 +02:00
Mr.doob 5cc9b3c544 ColladaLoader: Added Face4 and Vertex Colors support. 2011-09-20 00:12:57 -07:00
alteredq 0033a97542 Fixed bug preventing re-adding of objects removed from the scene.
Problem was that objects could be added to WebGLRenderer's internal render list only once (because of `webglInit` flag).

Now there are two separate internal states (`webglInit` and `webglActive`) so that object can be initialized just once (expensive operation) but added / removed from the scene many times (cheap operation).
2011-09-19 22:49:52 +02:00