kopia lustrzana https://github.com/OpenDroneMap/WebODM
Merge pull request #1221 from pierotofy/shading2
Bump mapping, environment maps during texture renderpull/1225/head
commit
869d577bbc
|
@ -4,7 +4,7 @@
|
|||
* @author angelxuanchang
|
||||
*/
|
||||
|
||||
THREE.MTLLoader = function ( manager ) {
|
||||
THREE.MTLLoader = function ( manager ) {
|
||||
|
||||
THREE.Loader.call( this, manager );
|
||||
|
||||
|
@ -373,6 +373,7 @@ THREE.MTLLoader.MaterialCreator.prototype = {
|
|||
// Diffuse texture map
|
||||
|
||||
setMapForType( "map", value );
|
||||
setMapForType( "bumpMap", "-bm 0.025 " + value);
|
||||
|
||||
break;
|
||||
|
||||
|
@ -458,7 +459,15 @@ THREE.MTLLoader.MaterialCreator.prototype = {
|
|||
|
||||
}
|
||||
|
||||
this.materials[ materialName ] = new THREE.MeshBasicMaterial( params );
|
||||
const loader = new THREE.CubeTextureLoader();
|
||||
loader.setPath( "/static/app/js/vendor/potree/envmaps/" );
|
||||
|
||||
textureCube = loader.load( [ 'px.jpg', 'nx.jpg', 'py.jpg', 'ny.jpg', 'pz.jpg', 'nz.jpg' ] );
|
||||
textureCube.encoding = THREE.sRGBEncoding;
|
||||
|
||||
params.envMap = textureCube;
|
||||
|
||||
this.materials[ materialName ] = new THREE.MeshStandardMaterial( params );
|
||||
return this.materials[ materialName ];
|
||||
|
||||
},
|
||||
|
|
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 7.1 KiB |
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 10 KiB |
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 7.9 KiB |
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 8.5 KiB |
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 8.8 KiB |
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 16 KiB |
Ładowanie…
Reference in New Issue