1028 Commits
Author SHA1 Message Date
alteredq ef5f67d1a6 Merged @greggman's cube texture autoscaling patch.
Made it toggleable with "renderer.autoScaleCubemaps" flag (on by default).
2011-12-21 18:31:17 +01:00
alteredq ab0ce36091 Unrolled shadow filtering loops to work on ATI OpenGL.
ATI OpenGL shader compiler doesn't seem to like texture access with UV coordinates generated in a loop.
2011-12-21 03:39:07 +01:00
alteredq 3dea25939c Refactored shadow test to work on some ATI cards with OpenGL.
Using boolean vector instead of "if ( expression && expression )".

This helps for hard shadows code path. There are still some problems with soft shadows code path, which still don't want to compile.
2011-12-21 01:37:54 +01:00
alteredq ccf6d803cd Fixed shadow darkness for non-soft shadow code path. 2011-12-21 01:11:10 +01:00
alteredq 47523c5fcc Added flag to SpotLight for only casting shadows.
This exists also in Blender, useful for when you want to add shadows independent of lighting (it's cheaper to turn off SpotLight than to have it with 0 intensity).
2011-12-20 22:57:57 +01:00
alteredq 5dc4bcc1d2 Added handling of BufferGeometry in ShadowMapPlugin. 2011-12-20 19:52:29 +01:00
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 272a83ff53 Fixed ColladaLoader crashing on "constant" materials. 2011-12-12 22:33:48 +01:00
alteredq 6ea8d3e83c Extended Texture class with "format" and "type" parameters.
As per @toji's "don't lie to WebGL about your format" recommendations in WebGL Camp 4 talk (http://media.tojicode.com/webglCamp4/#19).
2011-12-10 20:23:33 +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 757c4e62f6 Fixed bug in UTF8Loader. 2011-12-05 20:29:22 +01:00
alteredq 4ac72ffc75 Added material name tracking in Loader. 2011-12-02 19:59:37 +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 3163b79782 Added name copying to GeometryUtils.cloneObject (thanks to @C4RL05) 2011-11-30 15:24:26 +01:00
alteredq 36338eeeef Tweaked and renamed geometry extrude examples. 2011-11-30 12:12:39 +01: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 b1ef3409a6 Sorting out accidental double-merge. 2011-11-25 00:42:28 +01:00
alteredq 3aa1767844 Merge remote-tracking branch 'remotes/mrdoob/dev' into dev 2011-11-25 00:33:32 +01:00
Mr.doob c5613ebb53 Implemented again @ekitson's improvement to GeometyUrils.center. Increased light intensity in loader_json_blender example. 2011-11-25 00:31:12 +01:00
Mr.doob 5bcf179d3e Merging with @alteredq's branch. 2011-11-25 00:18:21 +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 43036191c6 Added frustum culling also for ParticleSystems.
This is optional, for now by default it's off, like it was before. It's up to application to update geometry bounding sphere if vertex positions change (like for meshes).
2011-11-22 06:26:00 +01:00
alteredq bac513dda9 Merge remote-tracking branch 'remotes/mrdoob/dev' into dev 2011-11-22 06:03:52 +01:00
alteredq 0fd25ba910 Added keeping stats also for point sprites. 2011-11-22 05:57:27 +01:00
Mr.doob aac4384e1c Updated builds. 2011-11-21 23:37:22 +01:00
Mr.doob f14e3dc72f Added .crossOrigin to Loader and ImageUtils.
Should fix #779...
2011-11-21 22:06:34 +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 606f008bec Fixed wrapping handling in ColladaLoader. 2011-11-21 07:35:16 +01:00
Mr.doob 618a079045 Changed some more .children to .childNodes. (Fixes webgl_collada.html example) 2011-11-21 07:08:53 +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 db6cb6d1cf Fixed ColladaLoader issue where node id was non-existent.
Fixes issue #747
2011-11-20 19:01:09 +01:00
Mr.doob 5d5bb3db00 Added .crossOrigin = '' to Loader.load_image() (thanks @remoe). 2011-11-20 18:43:18 +01:00
Mr.doob 032c511220 Updated builds. 2011-11-20 16:18:27 +01:00
alteredq 247ec49013 Small refactoring in plugins. 2011-11-19 04:28:49 +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 0c78ae95e9 Rest of the commit.
Because TortoiseGit suddenly refuses to make single commit with added and changed files :/
2011-11-18 23:56:45 +01:00
alteredq 4be5880b0f Made SpritePlugin and LensFlare plugins default.
Also some refactoring in plugins.

Still not really satisfied with a solution, will need to handle somehow ordering of plugins (both among them and with respect to rest of rendering, this would be needed for example to be able to redo shadow maps as a plugin).
2011-11-18 17:19:10 +01:00
alteredq 1dcf5fc79b Moved sprite handling into plugin.
Work in progress. Still just experimenting. Probably will make some auto-adding of plugins.
2011-11-18 05:08:40 +01:00
alteredq ebf93289f8 Resurrected lens flares as custom plugin.
Still a bit dirty but less than it was before. Maybe also sprites could be pluginized.
2011-11-18 01:26:20 +01:00