1. 06 10月, 2011 1 次提交
  2. 24 9月, 2011 1 次提交
  3. 02 9月, 2011 2 次提交
  4. 31 8月, 2011 3 次提交
  5. 30 8月, 2011 2 次提交
  6. 03 8月, 2011 1 次提交
    • A
      Added alphaTest parameter to base Material plus corresponding shader chunk in... · dc042582
      alteredq 提交于
      Added alphaTest parameter to base Material plus corresponding shader chunk in standard materials implementation.
      
      This is for having on/off transparency without sorting using threshold value in alpha channel of diffuse texture.
      
      By default it's switched off (alphaTest = 0).
      
      AlphaTest is not yet handled in shadow maps. This would require passing of diffuse texture to depth material in shadow map render step (and more permutations of depth material).
      dc042582
  7. 23 7月, 2011 1 次提交
  8. 18 7月, 2011 1 次提交
  9. 12 7月, 2011 1 次提交
  10. 08 7月, 2011 1 次提交
  11. 03 7月, 2011 1 次提交
  12. 02 7月, 2011 1 次提交
    • A
      Extended Loader base class to handle normal map materials. · bb332e5f
      alteredq 提交于
      Plus some more Loader changes:
      
      - fixed diffuse color and opacity being skipped when diffuse texture is present in JSON
      - more proper handling of Phong materials (now use ambient / diffuse / specular / shininess from JSON)
      - added handling of wrap / offset / repeat parameters for all textures
      
      Fixed broken multiple lights indices in new normal map shader and changed displacement scale and bias to saner values.
      
      Fixed broken postprocessing and Earth examples (were not yet translated to use new normal map shader).
      bb332e5f
  13. 01 7月, 2011 2 次提交
  14. 11 4月, 2011 1 次提交
    • A
      Added FlyCamera (thanks to James Baicoianu). Added specular map to normal map... · 22bd108a
      alteredq 提交于
      Added FlyCamera (thanks to James Baicoianu). Added specular map to normal map shader. Added WebGL Earth FlyCamera demo.
      
      Changed normal map shader to multiply specular component with diffuse weighting as specular highlights were appearing in the dark parts.
      
      Changed camera look speed in minecraft and terrain demos, they were too fast - I guess as everything got faster with antialiasing off.
      
      Reenabled antialiasing in few demos where it was too ugly without (basically anything with lines and without postprocessing).
      
      Fixed again spurious invisible characters in empaempa's code (which are breaking everything and are hard to hunt as they look like spaces).
      22bd108a
  15. 09 4月, 2011 1 次提交
  16. 28 2月, 2011 1 次提交
    • A
      Refactored everything to use CamelCase naming for properties. Plus some... · cf2e8c1b
      alteredq 提交于
      Refactored everything to use CamelCase naming for properties. Plus some smaller fixes here and there.
      
      Went through all examples, all should work.
      
      JSON files exported from Blender / converted from OBJ files still use underscored property names internally. I don't know, should these also be changed?
      cf2e8c1b
  17. 24 2月, 2011 1 次提交
    • A
      Textures are now updateable. · cff95a11
      alteredq 提交于
      That was much tougher than expected. No wonder other WebGL video demos around the web are broken.
      
      Firefox OpenGL / ANGLE and Chrome OpenGL were ok, getting it to work in Chrome ANGLE was rather tricky.
      
      Please report if something got broken. I tried to go through all textured examples but I may have missed something.
      
      If you want to refresh texture on WebGL side, you just set "texture.needsUpdate" flag (if you use Loader or ImageUtils.loadTexture / loadTextureCube everything is taken care of).
      
      Flag has to be set also for canvas-based textures, sorry no escaping this :(. I tried and it lead to ugly problems (e.g. AO minecraft demo mixes several asynchronously loaded and generated images into one texture, with autodetect always something was broken).
      
      "needsUpdate" should work also on cube textures, though it's not tested yet (also there I didn't put hack for Chrome ANGLE).
      cff95a11
  18. 17 2月, 2011 1 次提交
  19. 07 2月, 2011 1 次提交
    • A
      Added MarchingCubes object. · b198531c
      alteredq 提交于
      Very much work-in-progress. Expect things to change.
      
      Also changed film shader to have optional grayscale (controlled via uniform).
      b198531c
  20. 03 2月, 2011 2 次提交
  21. 02 2月, 2011 2 次提交
  22. 18 1月, 2011 1 次提交
  23. 27 12月, 2010 4 次提交
  24. 26 12月, 2010 2 次提交
    • A
      Added diffuse map to normal map shader. Changed Lee Perry-Smith demo to use normal map shader. · 6e91de5d
      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;
      6e91de5d
    • M
      WebGLRenderer2: Added env_map (SphericalReflectionMapping). · 0c3e69cc
      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`...
      0c3e69cc
  25. 18 12月, 2010 1 次提交
  26. 13 12月, 2010 2 次提交
  27. 09 12月, 2010 1 次提交
    • A
      Added normal + ambient occlusion + displacement mapping demo. · ac5276b4
      alteredq 提交于
      A lot of things going on in this commit:
      
      - added tangents computation for geometries
          - mesh must have UV coordinates
          - to be called explicitly once geometry is loaded like this: geometry.computeTangents()
          - tangents are stored in Vertex objects
          - quads are not solved properly (though workaround hack seems to work at least somehow, as far as each vertex appears at least somewhere)
      
      - extended VBOs in WebGLRenderer to include tangent streams (when available)
      
      - added "normal" shader to ShaderUtils (to be used with MeshShaderMaterial)
         - Blinn-Phong with one directional and one point light (7 varyings gone, just one spare)
         - normal maps are in tangent space
         - displacement maps use simple luminance value (could be changed if better precision is needed)
      
      - displacement mapping uses vertex texture fetch
          - this requires GPU with Shader Model 3.0
          - not currently supported in ANGLE
          - for this, added "supportsVertexTextures" method to WebGLRenderer API, so that application can handle this
      ac5276b4
  28. 01 12月, 2010 1 次提交