250 Commits
Author SHA1 Message Date
alteredq 60ee1e8ccb Added wrap-around lighting to Phong and Lambert materials (aka half-lambert from Half-Life 2).
With a little twist - per color component mixing of regular and wrap-around lightings.
2011-12-16 02:13:22 +01:00
alteredq 8ec6317ef8 Added BufferGeometry for direct rendering from typed arrays.
Work in progress. For the moment works just with CTMLoader. Still not sure where some pieces of code would go.

Upsides:
	- initialization time cut down significantly (1.8 seconds => 0.7 seconds for CTM example)
	- much smaller GL buffers thanks to fully used indexing (Walt has 6x less vertices)
	- consequently much smaller memory footprint all around, both for main and GPU memories,
	  which means less swapping and better vertex caching

Downsides:
	- can't have anymore sharp per-face effects like flat shading (at least if mesh is not constructed in a way where each face has own vertices)
	- can't have multiple materials per mesh
	- no more easy manipulation of anything (for the moment actually no runtime manipulation at all, typed arrays are just thrown away, dynamic geometries code path not yet implemented)
2011-12-07 01:47:39 +01:00
alteredq 019a0f59ef Some more GLSL precision cleanup. 2011-12-02 14:16:38 +01:00
Mr.doob 37f2ad3b19 Changed default precission to mediump.
As per Giles recommendation here http://learningwebgl.com/blog/?p=4379
2011-12-02 06:00:00 +09:00
alteredq 370d20b407 Refactored normal map shader.
Doing normalization of normals / binormals / tangents in fragment shader instead of vertex shader. This seems to help with artefacts appearing in certain models with OpenGL rendering backend.

Also added modulating environment reflection by specular map.
2011-11-29 12:20:54 +01:00
Mr.doob 5697084e64 Moved RequestAnimationFrame.js code right into src/Three.js. 2011-11-29 03:29:13 +01:00
alteredq befc98a01e Refactored bounding box to use 2x Vector3 instead of custom object. 2011-11-25 03:01:00 +01:00
alteredq 1d5a72ddc9 Resurrected UVs normalization (as GeometryUtils.normalizeUVs).
Turns out it may be useful after all, seems some GPUs may have troubles dealing with texture coordinates outside of <0,1> (need to be tested if normalization helps there).
2011-11-24 22:36:30 +01:00
Mr.doob 2ea8cbae2a Fixed a bug in GeometryUtils.merge where it would create a material index per face. 2011-11-24 03:26:46 +01:00
alteredq bac513dda9 Merge remote-tracking branch 'remotes/mrdoob/dev' into dev 2011-11-22 06:03:52 +01:00
Mr.doob 3be2cdae2c Better Rectangle.intersects() formula. 2011-11-21 20:18:37 +01:00
alteredq d906f301bd Updated builds. 2011-11-21 15:34:14 +01:00
alteredq 90097cf401 Merge remote-tracking branch 'remotes/mrdoob/dev' into dev 2011-11-21 15:32:03 +01:00
alteredq 7168bc2435 Added more random functions to THREE.Math 2011-11-21 15:30:42 +01:00
Mr.doob 13e3c8f255 Updated builds. 2011-11-21 06:20:23 +01:00
alteredq 655b1efbde Merge remote-tracking branch 'remotes/mrdoob/dev' into dev
Animation / skinning / path controller are now broken :/
2011-11-20 22:16:54 +01:00
alteredq e207f5e852 Changed lights to use global positions.
This should allow attaching of lights to objects. As a side effect, directional lights positions don't need to be normalized explicitly anymore.

Also changed viewport dimensions passed to render plugins to work with render targets with different dimensions than the screen framebuffer.

And fixed new dependencies in build script.
2011-11-20 20:18:16 +01:00
Mr.doob 032c511220 Updated builds. 2011-11-20 16:18:27 +01:00
alteredq 10052662ab Merge branch 'dev' into renderer_plugins 2011-11-19 01:22:41 +01:00
alteredq 91233570cf Transplanted bug fixes from @ekitson's commit.
"Fixed typos in Matrix4's transpose() and getInverse()"

https://github.com/AddictArts/three.js/commit/62d2560b3c7b9868fc25f628c4022448aaff6b00
2011-11-19 01:18:39 +01:00
alteredq 3ded4a408f Changed Projector to use Frustum.
Also some bugfixes in ShadowMapPlugin and SpritePlugin.
2011-11-19 00:48:17 +01:00
alteredq 81297f6879 Updated builds. 2011-11-17 01:33:42 +01:00
Mr.doob bd2f75b48a Updated r46 with some bugfixes found post release. 2011-11-17 01:14:01 +01:00
alteredq 291d56186c Fixed Ray bug. 2011-11-16 23:14:49 +01:00
alteredq f61edd14c2 Fixed shadowmap update bug.
Hope so. There is now just a single scene graph update per frame render (plus some extra one-shot updates if light cameras are auto-added to scene graph).
2011-11-15 19:13:12 +01:00
Mr.doob 579ba1f7ab r46 2011-11-13 22:25:01 +01:00
alteredq dd7e1e84ee Removed redundant GL call in render target setup.
Also fixed RTT example - seems UV mapping for SphereGeometry is now rotated 180 degrees.
2011-11-13 20:10:31 +01:00
Mr.doob 3c61c0c702 Updated builds. 2011-11-11 19:01:23 +01:00
alteredq 9a375c4f39 Fixed bug where you couldn't change attribute types when updating buffers.
Too much caching can break things.
2011-11-11 18:38:52 +01:00
Mr.doob b406568dce Refactored SphereGeometry
Now uses Face4 where posible.
Adde phiStart, phiLenght, thetaStart and thetaLength as extra parameters (useful for doing google-earth-like stuff).
2011-11-07 02:34:38 +01:00
alteredq 2ba6aabdc7 Added missing semicolon. 2011-10-30 15:28:20 +01:00
Mr.doob f4063649a0 And yet some more Ray optimisations :P
And still readable code...
2011-10-30 14:23:24 +01:00
alteredq b6e7ad88af Optimized Ray a bit more.
It's enough to clone just for hits, no need to do it for every face.
2011-10-30 14:04:53 +01:00
Mr.doob 7ce228ad12 Optimised Ray yet again. Adeed @banaadams 's texture.onUpdate. 2011-10-30 13:33:41 +01:00
Mr.doob dad6911bb0 Optimised Ray a bit more
Removed some clone() calls while still keeping the code somewhat pretty.
2011-10-29 10:30:08 +02:00
Mr.doob ca38a3ff1c Added precision parameter to WebGLRenderer
So we can set it to lowp for mobile devices if needed.
2011-10-29 06:52:43 +02:00
alteredq a8f8411e9a Updated builds. 2011-10-28 11:59:37 +02:00
alteredq 6e84e89d16 Some more fixes thanks to verbose Closure compiler errors. 2011-10-28 11:55:12 +02:00
alteredq 046f4bfeb6 Added custom attributes for lines. 2011-10-25 18:26:28 +02:00
Mr.doob 1f7838a9c2 Fixed bug in Ray's pointInFace3. 2011-10-25 10:10:41 +02:00
Mr.doob 5916682ea6 Reverting again
Actually, this would break cameras added as childs of objects, reverting.
So there is no clear and simple way to handling multiple scenes unfortunatelly.
Encouraging `scene.add( camera )` seems like the right thing to do then, less problems.
2011-10-25 05:59:13 +02:00
Mr.doob 13e4f78a28 Reverting my thought
Actually, I think this can be handled magically instead of requiring understanding of the concept that the camera is part of the scenegraph.
While I was at it, I fixed it so you can use a camera for rendering different scenes (the renderer will add it and remove from each scene graph)	.
2011-10-25 05:47:13 +02:00
Mr.doob d902ca3bf0 Updated builds and tweaked examples
Removed LOD text example. I think LOD example is good enough.
Ubiquity test working again.
Tweaked README to show the new pattern (Scene first thing created).
2011-10-25 01:50:17 +02:00
Mr.doob 747b813bcb Merging with @alteredq's branch 2011-10-25 01:18:31 +02:00
Mr.doob e54f2e32e7 Updated builds. 2011-10-24 14:43:33 +02:00
alteredq 408c82d306 Got WebGLRenderer working again.
I had to resurrect parts of old code (keeping track of scene graph changes).

Good news: performance is great, new scene graph gains compound with buffers optimizations and non-array materials refactoring. Together we gained about 15% for rotating cubes performance test (pushing max to 2650 cubes at 60 fps).

Still broken with new scene graph: lod, skinning, collisions, AnaglyphWebGLRenderer, ParallaxBarrierWebGLRenderer, multi-canvas circle example.
2011-10-24 12:30:04 +02:00
Mr.doob caabab07f3 Lines can be treated as Objects 2011-10-23 14:18:57 +02:00
Mr.doob ec00f298be CanvasRenderer and SVGRenderer using single-material system.
Also moved `.overdraw` to Material.
Code is much simpler now :)
2011-10-23 13:50:55 +02:00
Mr.doob 6b151b552e Merging with @alteredq's experimental branches. 2011-10-23 12:34:46 +02:00
alteredq 093fbbe334 Merge remote-tracking branch 'remotes/mrdoob/dev' into dev
WebGL part of this branch is completely broken. Do not use. This is for further merging.
2011-10-15 18:37:59 +02:00