Преглед на файлове

Specify encoding in drag-n-drop

WestLangley преди 6 години
родител
ревизия
637749ab59
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      examples/webgl_materials_matcap.html

+ 3 - 0
examples/webgl_materials_matcap.html

@@ -192,6 +192,9 @@
 				mesh.material.matcap = new THREE.Texture( event.target );
 				mesh.material.matcap.needsUpdate = true;
 
+				mesh.material.matcap.encoding = THREE.sRGBEncoding; // assume it is sRGB
+				mesh.material.needsUpdate = true;
+
 				image.src = mesh.material.matcap.image.src; // corner div
 
 				render();