repo: janusweb
action: commit
revision: 
path_from: 
revision_from: 636c0cb770e0ebe4a91d401ca0b5b7b43f808279:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit 636c0cb770e0ebe4a91d401ca0b5b7b43f808279
Author: James Baicoianu 
Date:   Wed Mar 28 00:11:16 2018 -0700

    Only set material roughness if using pbr

diff --git a/scripts/text.js b/scripts/text.js
index eefaf1b432d3ae082e3745d4a14cb33e4c73329a..
index ..be850685659e122d8a91b77f993e11c4be62dc62 100644
--- a/scripts/text.js
+++ b/scripts/text.js
@@ -67,9 +67,11 @@ elation.require(['engine.things.label'], function() {
         emissive: this.properties.emissive, 
         shading: THREE.SmoothShading, 
         depthTest: this.properties.depthTest,
-        roughness: .5,
         reflectivity: .5
       };
+      if (this.room.pbr) {
+        matargs.roughness = .5;
+      }
       var material = (this.room.pbr ? new THREE.MeshPhysicalMaterial(matargs) : new THREE.MeshPhongMaterial(matargs));

       if (this.properties.opacity < 1.0) {

-----END OF PAGE-----