Merge pull request #1221 from pierotofy/shading2

Bump mapping, environment maps during texture render
pull/1225/head
Piero Toffanin 2022-08-09 13:43:57 -04:00 zatwierdzone przez GitHub
commit 869d577bbc
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
7 zmienionych plików z 11 dodań i 2 usunięć

Wyświetl plik

@ -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