- 28 10月, 2011 2 次提交
-
-
由 alteredq 提交于
-
-
- 27 10月, 2011 4 次提交
-
-
由 alteredq 提交于
-
由 alteredq 提交于
More moving ifs out of inner loops.
-
由 alteredq 提交于
Also here moved ifs out of the inner loop. Starts to get hard to measure performance impact - baseline JavaScript stuff just to produce some change gets very costly. Simply calling Math.random() hundreds thousands times causes massive garbage collection :S.
-
由 alteredq 提交于
No need for copy of attributes map here, attributes list has the same function.
-
- 26 10月, 2011 7 次提交
-
-
由 alteredq 提交于
-
由 alteredq 提交于
More moving ifs out of inner loops: gained 25% performance for dynamic meshes with custom attributes. Hope I didn't break something.
-
由 alteredq 提交于
Moved most of ifs out of inner loops for ~25% performance gain with dynamic meshes. Custom attributes setting for meshes can still be improved more.
-
由 alteredq 提交于
This gave us ~13% performance gain for dynamic meshes.
-
由 alteredq 提交于
Interestingly, this was breaking OpenGL but not ANGLE.
-
由 alteredq 提交于
-
由 alteredq 提交于
-
- 25 10月, 2011 2 次提交
-
-
由 Mr.doob 提交于
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.
-
由 Mr.doob 提交于
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) .
-
- 24 10月, 2011 2 次提交
-
-
由 alteredq 提交于
-
由 alteredq 提交于
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.
-
- 23 10月, 2011 2 次提交
- 22 10月, 2011 1 次提交
-
-
由 alteredq 提交于
This is to be able to skip redundant updates in multipass rendering (like for shadow maps or dynamic cube maps). Also reshuffled initWebGLObjects calls to have just a single update in a basic scenario of shadow map pass followed by scene render. Still need to solve somehow potential redundant updates in EffectComposer (which can mix multiple scenes).
-
- 21 10月, 2011 6 次提交
-
-
由 alteredq 提交于
-
由 alteredq 提交于
Just for the sake of consistency, when object properties are not involved performance difference is negligible.
-
由 alteredq 提交于
These little buggers were costing 3.35% of the total time in performance test.
-
由 alteredq 提交于
-
由 alteredq 提交于
Noticeable difference: can't anymore assign Material references to faces directly - "face.materials" became "face.materialIndex". Materials have to go to "geometry.materials" array (to which "face.materialIndex" points). This is necessary to allow run-time changing of face materials (this indirection used to be done by arrays). Some casualties: - multi-materials example, this functionality isn't possible anymore - had to simplify LOD Text examples as LODs don't handle groups (used to fake multi-materials) - multi-materials sphere in materials example can't have faces with undefined materials (this may be fixable I guess, when there'll be some real use-case) - scene format still has materials arrays, only the last material will be used (except when there are face materials, then materials from JSON will be used, as before) Other renderers and their corresponding examples were not touched yet. WebGLRenderer still needs some prettification, some things don't make sense anymore without arrays, code can be cleaned up further.
-
由 alteredq 提交于
Do not use for anything, this is just snapshot of a test in progress. I solved quite a few issues, but many things are still clumsy and broken.
-
- 19 10月, 2011 1 次提交
-
-
由 alteredq 提交于
New per-pixel Phong code is enabled by setting `perPixel` parameter in Phong material. This version is able to light single untesselated quad correctly. Also it doesn't have point lights number limitation caused by varyings, all lights pass just through uniforms. Performance wise it seems surprisingly quite similar to old version (stress test is ~6 fps faster with new version, though I guess for different use cases / GPUs it can differ).
-
- 18 10月, 2011 2 次提交
-
-
由 alteredq 提交于
Metal makes specular term multiplicative (default is additive). This is to be able to have textured materials that do not have diffuse color, just a specular one, to get metallic look (additive specular gives plastic look).
-
由 alteredq 提交于
Removed diffuse color influence on ambient term in Phong. This was causing texture disappearance when diffuse color was black. Made Lambert more similar to Phong: now it also has ambient color parameter. Before ambient light was affecting Lambert as if ambient color was always 0xffffff.
-
- 16 10月, 2011 2 次提交
- 15 10月, 2011 1 次提交
-
-
由 alteredq 提交于
Apparently iterating over object properties is dangerous even if that code path is not executed. Stress-testing particles buffers setting showed 60% performance increase (in Chrome) even when there were no custom attributes (and thus custom attributes handling code behind "if ( customAttributes )" was never executed). I suspect this may be caused by some V8 optimization heuristics.
-
- 12 10月, 2011 2 次提交
-
-
由 alteredq 提交于
This is for being able to render shadowmap just once per frame - all dynamic cubemap faces and full scene can share the same shadowmap (at least until we don't have camera-specific fine-tuned shadowmaps).
-
由 alteredq 提交于
Do not merge, this is very experimental, not sure about correctness, also tons of unsolved things.
-
- 11 10月, 2011 2 次提交
-
-
由 alteredq 提交于
Turns out before all cube texture faces shared a single depth buffer. Last cube face still missing.
-
由 alteredq 提交于
Before lighting was messed up in dynamically generated cube maps. Dynamic cube maps need to have flip uniforms (flipEnvMap / tFlip) set to 1, static cube maps to -1 (default). For standard materials this is handled automatically, it's just something to be aware of when using cube maps in custom ShaderMaterials (dynamic and static cube maps have different cube face orientations, dynamic ones are correct, static ones need flipped x-axis in lookup vector). There is still mystery of disappearing last cube face (negative-Z) and weirdly clipped objects in cars demo (works ok in simpler test).
-
- 08 10月, 2011 2 次提交
- 07 10月, 2011 1 次提交
-
-
由 gman 提交于
-
- 06 10月, 2011 1 次提交
-
-
由 Mr.doob 提交于
-