From 314b34423070cf127464da79a53cddf6b1c38587 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Sat, 06 May 2017 20:33:17 -0400
Subject: [PATCH] Skin shader

---
 Object3D.java |   28 +++++++++++++++-------------
 1 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/Object3D.java b/Object3D.java
index 8f3990d..ebab7df 100644
--- a/Object3D.java
+++ b/Object3D.java
@@ -935,7 +935,7 @@
 
     public Object clone()
     {
-        return GraphreeD.clone(this);
+        return GrafreeD.clone(this);
     }
 
     Object3D copyExpand()
@@ -1701,7 +1701,7 @@
             Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name);
             o.bRep = transientrep;
             if (clone)
-                o.bRep = (BoundaryRep) GraphreeD.clone(transientrep);
+                o.bRep = (BoundaryRep) GrafreeD.clone(transientrep);
             o.CreateMaterial();
             o.SetAttributes(this, -1);
             //parent
@@ -1714,7 +1714,7 @@
             Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name);
             o.bRep = bRep;
             if (clone)
-                o.bRep = (BoundaryRep) GraphreeD.clone(bRep);
+                o.bRep = (BoundaryRep) GrafreeD.clone(bRep);
             o.CreateMaterial();
             //o.overwriteThis(this, -1);
             o.SetAttributes(this, -1);
@@ -1756,7 +1756,7 @@
 //        {
 //            assert(bRep == null);
 //            Object3D o = new Object3D("Geometry:" + this.name);
-//            o.bRep = (BoundaryRep) GraphreeD.clone(transientrep);
+//            o.bRep = (BoundaryRep) GrafreeD.clone(transientrep);
 //            o.CreateMaterial();
 //            parent.addChild(o);
 //        }
@@ -1765,7 +1765,7 @@
 //        {
 //            assert(transientrep == null);
 //            Object3D o = new Object3D("Geometry:" + this.name);
-//            o.bRep = (BoundaryRep) GraphreeD.clone(bRep);
+//            o.bRep = (BoundaryRep) GrafreeD.clone(bRep);
 //            o.CreateMaterial();
 //            parent.addChild(o);
 //        }
@@ -3153,7 +3153,7 @@
         
         BoundaryRep sup = bRep.support;
         bRep.support = null;
-        BoundaryRep temprep = (BoundaryRep) GraphreeD.clone(bRep);
+        BoundaryRep temprep = (BoundaryRep) GrafreeD.clone(bRep);
 //            bRep.SplitInTwo(onlyone); // thread...
             temprep.SplitInTwo(reduction34, onlyone);
             bRep = temprep;
@@ -3677,7 +3677,7 @@
             if (child == null)
                 continue;
             
-            if (GraphreeD.RENDERME > 0)
+            if (GrafreeD.RENDERME > 0)
             {
                 if (child instanceof Merge)
                     ((Merge)child).renderme();
@@ -3828,7 +3828,7 @@
                 if (child == null)
                     continue;
                 
-                if (GraphreeD.RENDERME > 0)
+                if (GrafreeD.RENDERME > 0)
                 {
                     if (child instanceof Merge)
                         ((Merge)child).renderme();
@@ -4023,7 +4023,7 @@
                 if (child == null)
                     continue;
                 
-                if (GraphreeD.RENDERME > 0)
+                if (GrafreeD.RENDERME > 0)
                 {
                     if (child instanceof Merge)
                         ((Merge)child).renderme();
@@ -5519,7 +5519,9 @@
                     display.options2[2] = material.factor;
 
                     cColor.HSBtoRGB(material.color, material.modulation, 1, display.options3);
-                    display.options3[3] = material.cameralight/0.2f;
+                    display.options4[0] = material.cameralight/0.2f;
+                    display.options4[1] = material.subsurface;
+                    display.options4[2] = material.sheen;
                     
                  //   if (display.CURRENTANTIALIAS > 0)
                  //       display.options3[3] /= 4;
@@ -5819,12 +5821,12 @@
             if (!child.HasTransparency())
             {
                 sel = root != null && root.selection != null && root.selection.indexOf(child) != -1;
-           //     GraphreeD.tracein("draw ", child);
+           //     GrafreeD.tracein("draw ", child);
                 boolean wasblocked = blockdraw;
                 blockdraw = true;
                 child.draw(display, root, selected || sel, wasblocked || blocked); //  || child.IsSelected());
                 blockdraw = false;
-           // GraphreeD.traceout("draw ", child);
+           // GrafreeD.traceout("draw ", child);
             }
 
             release(i);
@@ -8041,7 +8043,7 @@
         {
             assert(bRep != null);
             if (!(support instanceof GenericJoint)) // support.bRep != null)
-                GraphreeD.Assert(support.bRep == bRep.support);
+                GrafreeD.Assert(support.bRep == bRep.support);
         }
         else
         {

--
Gitblit v1.6.2