Mikael Emtinger
2c8b6b35fe
Fixed bug in lens flare
2011-04-06 16:11:06 +02:00
Mikael Emtinger
f70aaed1d8
Merge branch 'master' of git://github.com/mrdoob/three.js
2011-04-06 12:18:11 +02:00
Mikael Emtinger
c3ab2eb1e9
Rewrote lens flares to not use readPixels. There are different solutions based on availablity of vertex textures. If available, occlusion calculation is more exact and handles partial occlusion on screen edges. If not available, occlusion calculation is less exact (because it's made on each fragment so it has to be fast) and partial occlusion by screen edge is not possible (same reason).
...
It's not possible for the lens flare to update on visibility any more, only its screen position. Potentially, we could add offset+factor for opacity/scale/rotation that is dependent on visibility in shader. Or just custom shaders.
Anyway, it's way faster than readPixels :)
2011-04-06 12:17:42 +02:00
alteredq
f221b853b7
Refactoring and optimizations in collision system and examples.
...
Mainly trying to avoid creation of new object per frame and also some variable names clarifications and whitespace cleanups.
Not finished yet.
2011-04-06 00:07:13 +02:00
alteredq
1fd801719f
Added option to have flat shading for renderBufferImmediate.
2011-04-05 20:30:58 +02:00
alteredq
5c943cab3e
Fixed broken MarchingCubes.
...
MarchingCubes.generateGeometry got forgotten when refactoring vertex normals.
2011-04-05 16:47:24 +02:00
alteredq
4470e0f619
Merged physics branch into master.
...
Also some whitespace and titles cleanup.
2011-04-05 16:10:23 +02:00
alteredq
07294ccfaf
Merge remote branch 'remotes/drojdjou/master' into physics
2011-04-05 12:06:13 +02:00
alteredq
65e3f92d55
Merged latest master branch into physics branch.
2011-04-05 12:04:24 +02:00
Bartek Drozdz
0017fa4285
Removed comments from Collision classes
2011-04-05 11:44:37 +02:00
alteredq
693a36f509
Moved scene loader from SceneUtils into SceneLoader.
2011-04-05 08:59:45 +02:00
alteredq
f7e3a80d70
Added edges computation to OBJ converter.
...
If you want to get edges, run converter like with "-e" flag:
python convert_obj_three.py -i model.obj -o model.js -e
Output seems to match Blender exporter.
2011-04-05 03:37:13 +02:00
alteredq
7915999bdd
Added edges to Blender exporter, JSONLoader and Geometry.
...
There is a new class Edge which stores vertices and faces for edge (I wasn't sure if indices or references would be better, so at least for the moment it contains both).
Geometry now contains a list of such edges, created in JSONLoader, based on edge data exported from Blender.
From Blender we get a list of vertex index pairs, from which in Geometry.computeEdgeFaces() we compute faces which share this particular edge and store them in the Edge object.
Not sure if edges work properly till we don't have something using them. For now I just checked cube data exported from Blender and it seems fine.
Also did some whitespace cleanup here and there.
2011-04-05 00:18:36 +02:00
Bartek Drozdz
9850695f38
Collisions system initial commit.
2011-04-04 18:13:54 +02:00
Mr.doob
5742cceefd
Ray: Added support for object.flipSided and object.doubleSided properties.
2011-04-04 13:10:25 +01:00
Mr.doob
b899391008
Updated buillds.
2011-04-04 05:13:04 +01:00
Mr.doob
abb4a774cd
Merging with alteredq.
2011-04-04 05:00:21 +01:00
Mikael Emtinger
0acad374a1
Added .fog as parameter (to used for enabeling refreshing and setting of fog uniforms in MeshShaderMateiral)
2011-04-04 00:19:42 +02:00
Mikael Emtinger
e7b6f4ad3c
Merged with mrdoob
2011-04-03 20:44:15 +02:00
Mikael Emtinger
ea42310975
Added .boundTo in custom attributes. If not defined, it assumes that the custom attribute data has the length of vertices (boundTo="vertices"). If boundTo="faces", the custom attribute data has the length of faces.length. If boundTo="faceVertices" the cursom attribute data has the length of: numFace3*3 + numFace4*4.
...
This can be used for setting face colors or vertex colors per face (faces that share vertex can have separate colors).
2011-04-03 20:42:24 +02:00
alteredq
477b0095a9
Added dumping of scale to Blender exporter / handling of scale to JSONLoader.
...
This is backwards compatible: for existing models that don't have scale nothing should change.
2011-04-03 08:48:08 +02:00
alteredq
7e6ba581de
Removed some bottlenecks in shader building / sharing.
...
- for shader reuse materials from the standard library are now identified just by shader name (MeshShaderMaterials still use full code)
- unique shader id strings are constructed via array.join instead of string plus
- uniform and attribute locations are now cached in buildProgram (biggest one)
Also some smaller optimizations and cleanups in DOF example.
2011-04-03 04:19:00 +02:00
Mikael Emtinger
08642c5239
Merged with mrdoob.
...
Added depthBuffer/stencilBuffer flags to WebGLRenderTarget and support for that in WebGLRenderer. Done to support stencil shadows in renderTarget. For some reason { depthBuffer:false, stencilBuffer:true } doesn't work so this is deafulted to both:false.
2011-04-02 11:40:03 +02:00
alteredq
e19bf17645
Synced with mrdoob's branch.
2011-04-02 09:16:29 +02:00
Mr.doob
8c3fa8f401
WebGLRenderer: Removed unneded program checks.
2011-04-02 07:24:30 +01:00
alteredq
3b43c79679
Added possibility of enforcing vertical angle constraint to QuakeCamera.
2011-04-02 01:32:53 +02:00
Mikael Emtinger
b35b70a0e0
Fixed bug in stencil shadow renderer.
...
Added Q-button to Quake Camera to freeze update (good to have when debugging stuff so camera go away)
2011-04-01 18:19:18 +02:00
alteredq
27b0ee0be7
Updated Loader to handle more material parameters (blending, transparent, depthTest).
2011-04-01 15:53:39 +02:00
Mr.doob
29da25e746
WebGLRenderer: Added internal cache for compiled shaders. Already compiled shaders get reused.
2011-04-01 07:38:22 +01:00
alteredq
b6aa8c8433
And some more globals, third time is a charm?
2011-04-01 04:08:41 +02:00
alteredq
a53921fb22
Fixed more globals in JSONLoader. Also updated ubiquity test includes.
2011-04-01 03:57:06 +02:00
alteredq
2d7833d32e
Fixed runaway globals in JSONLoader.
2011-04-01 03:34:26 +02:00
alteredq
d12252421e
Synced with mrdoob's branch.
2011-03-31 23:48:38 +02:00
Mr.doob
816d19a8d6
REVISION ++
2011-03-31 22:29:53 +01:00
alteredq
f518051f1f
Fixed some spurious invisible character in WebGLRenderer.
...
No idea where they came from, looks like maybe some different encoding than ascii?
In Scite / Chrome console they look like 0Â.
2011-03-31 23:25:48 +02:00
Mikael Emtinger
70594cc9ce
Fixed so dirty=false after uploading custom attribute
2011-03-31 15:45:48 +02:00
Mikael Emtinger
e88b1b4783
Merged with mrdoob.
...
Fixed so lens flares uses AdditiveBlending in example.
2011-03-31 13:57:52 +02:00
Mikael Emtinger
a0b0de46ff
Added support for custom attributes in MeshShaderMaterial.
...
Added support for THREE.Vector4 as uniform.
2011-03-31 13:54:33 +02:00
Mr.doob
d5cff3fd37
WebGLRenderer: Removed dupe blending.
2011-03-31 08:43:37 +01:00
Mr.doob
bfceae1655
Minor formating clean up.
2011-03-31 07:42:30 +01:00
Mr.doob
0014ce7215
Fixed glass transparency in scene example.
2011-03-31 07:29:10 +01:00
Mr.doob
8af4dd49c1
WebGLRenderer now uses material.transparent to determine whether a material is transparent or not.
...
Moved materials/RenderTarget.js ⟶ renderer/WebGLRenderTarget.js
2011-03-31 07:22:44 +01:00
Mikael Emtinger
7b07f34b7d
merged with mrdoob. fixed so depthMask is correctly restored after stencil and lensflares. removed all enable/disable _gl.BLEND as it's always on.
2011-03-30 20:52:23 +02:00
alteredq
f51a53bd23
Synced with mrdoob's branch.
2011-03-30 06:41:48 +02:00
alteredq
ccc566463e
Replaced QuakeCamera's dragToLook parameter with activeLook parameter.
...
DragToLook was weird, instead activeLook can be now used for simple switching on/off of mouse look around.
2011-03-30 06:38:24 +02:00
Mr.doob
8b63842305
CanvasRenderer: Hocked materials linecap/linejoin/wireframeLinecap/wireframeLinejoin with context.linecap/linejoin. Made it 'round','round' by default again.
2011-03-30 02:08:05 +01:00
Mr.doob
67c7b15552
Reverting Camera.update as how it was before (as it turned out that wasn't the problem). This needs more testing.
2011-03-29 20:23:55 +01:00
Mikael Emtinger
3536f3f2f5
Merged with MrDoob
2011-03-29 20:50:45 +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
3960e5c8ef
Camera was hitting infinite loop when useTarget = true. Hopefully this fixes it.(Thx bai)
2011-03-29 10:11:01 +01:00