- 30 12月, 2010 1 次提交
-
-
由 Szymon Nowak 提交于
-
- 29 12月, 2010 4 次提交
-
-
由 Mr.doob 提交于
-
由 Mr.doob 提交于
-
由 alteredq 提交于
None of the demos seem to be slower, some are noticeably faster (especially terrain). I suspect biggest performance gain comes from conditional include of environment mapping: if it's not used, it doesn't go into shader at all.
-
由 alteredq 提交于
Refactored uniforms cloning into separate file so that it can be reused also for MeshShaderMaterials. Also changed MeshShaderMaterial demos to show how to use cloning. For these particular demos uniforms cloning is not really necessary as they use only one instance of shader material, but for example, if there were two normal mapped models in one scene, each model would need separate material with own uniforms.
-
- 28 12月, 2010 3 次提交
- 27 12月, 2010 10 次提交
-
-
由 Mr.doob 提交于
-
由 Mr.doob 提交于
Re-tweaked normalmap2 demo.
-
由 Mr.doob 提交于
-
由 Mr.doob 提交于
-
由 Mr.doob 提交于
-
由 alteredq 提交于
-
由 Mr.doob 提交于
Tweaked normalmap2 demo parameters.
-
由 Mr.doob 提交于
Updated normalmap2 demo inverting the X/Y components.
-
由 alteredq 提交于
Normal-mapped ninja now looks slightly different from Phong ninja, but Lee looks less artificial ;)
-
由 alteredq 提交于
This is necessary for having multiple materials using the same shaders with different parameters.
-
- 26 12月, 2010 10 次提交
-
-
由 alteredq 提交于
For the moment, only one type of fog is baked into shader, depending on scene.fog initial value. If use case arise for dynamic fog type switching, this could be changed, though than both fogs would need to be computed all the time :S.
-
由 alteredq 提交于
Diffuse map and ambient occlusion maps are now optional in normal map shader. By default, both are disabled, so they need to be enabled explicitly like this: uniforms[ "enableAO" ].value = true; uniforms[ "enableDiffuse" ].value = true;
-
由 Mr.doob 提交于
-
由 alteredq 提交于
-
由 alteredq 提交于
This allows to work around ANGLE antialiasing issue appearing when compositing WebGL framebuffer with transparent background color with HTML canvas element background (while keeping antialiasing on). WebGLRenderer constructor now takes JSON object with few optional parameters: renderer = new THREE.WebGLRenderer { scene: scene, antialias: true, clearColor: 0x000000, clearAlpha: 0 }; Here is how to change clear color in runtime: renderer.setClearColor( 0xff0000, 1 );
-
由 Mr.doob 提交于
-
由 Mr.doob 提交于
-
由 Mr.doob 提交于
-
由 Mr.doob 提交于
Moved near/far values from MeshDepthMaterial to Camera (CanvasRenderer/WebGLRenderer/WebGLRenderer2).
-
由 Mr.doob 提交于
Eventually I'll have to continue in the experimental branch. Want to give it a go to the ColorPass/TexturePass material API. The color + map + env_map setup feels too limiting... Now that I have more knowledge of WebGL and shaders, this is how the ColorPass/TexturePass API looks like: var material = [ new THREE.MeshLambertMaterial( [ new THREE.ColorPass( 0xff0000, 1, THREE.NormalBlending ), new THREE.TexturePass( new Texture( <image>, new THREE.UVMapping() ), 0.5, THREE.NormalBlending ), new THREE.TexturePass( new Texture( [ <image>, <image>, <image>, <image>, <image>, <image> ], new THREE.CubeRefractionMapping() ), 1, THREE.SubtractiveBlending ), new THREE.ColorPass( 0x0000ff, 1, THREE.AdditiveBlending ) ], { blending: THREE.NormalBlending } ), new THREE.MeshBasicMaterial( [ new THREE.ColorPass( 0xff0000, 1 ), ], { blending: THREE.AdditiveBlending, wireframe: true } ), new THREE.MeshPhongMaterial( [ new THREE.ColorPass( 0xff0000, 1 ), ], { ambient: 0x000000, specular: 0xbbaa99, shininess: 50, blending: THREE.NormalBlending } ); ]; Makes things a bit longer but I think it's more intuitive this way (and pretty powerful). However, the simplest material would be like this: var material = new THREE.MeshBasicMaterial( new THREE.ColorPass( 0xff0000 ) ); Mhh... Now I don't know whether they should called `*Pass`, or `*Layer`...
-
- 25 12月, 2010 3 次提交
- 24 12月, 2010 3 次提交
-
-
由 Mr.doob 提交于
-
由 Mr.doob 提交于
WebGLRenderer2: Added antialias parameter to constructor. Removed `if` from shader, using `fog *` instead.
-
由 alteredq 提交于
This is a workaround for Chrome ANGLE antialiasing issue manifested in geometry_terrain_fog demo: http://twitpic.com/3iftyh Problem happens in Chrome ANGLE when geometry is rendered with the same color as canvas background - then instead of expected nothing to be seen, there is a faint white outline at geometry borders. This issue is not specific to fog, even just rendering geometry with MeshBasicMaterial having the same color as background produces the same outline. TODO: create isolated test case and file ANGLE / Chromium bug.
-
- 22 12月, 2010 1 次提交
-
-
由 Mr.doob 提交于
WebGLRenderer2: Fixed a possible issue when modifying scene parameters and having only one program (thx alteredq)
-
- 21 12月, 2010 5 次提交
-
-
由 Mr.doob 提交于
-
由 Mr.doob 提交于
Projector::projectScene now does a first pass through Projector::projectObject (which does frustum culling and object sorting). So now CanvasRenderer and SVGRenderer feature frustum culling too.
-
由 alteredq 提交于
-
由 alteredq 提交于
For the moment, it works just on Basic / Lambert / Phong materials. Fog must be added to the scene before initialization of WebGLRenderer and scene must be passed to WebGLRenderer constructor (like for lights). I don't know yet how to solve properly MeshShaderMaterial & co :(
-
由 Mr.doob 提交于
-