From cb6c8d451be83d2fe96e5d3a4719f93c23985250 Mon Sep 17 00:00:00 2001
From: Elohiem <20236-Elohiem@users.noreply.gitgud.io>
Date: Mon, 2 Aug 2021 20:32:28 +0200
Subject: [PATCH] Scaling and coloring

---
 src/art/webgl/art.js |  6 +++---
 src/art/webgl/ui.js  | 10 ++++++++--
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/art/webgl/art.js b/src/art/webgl/art.js
index ae44f15ac80..f69d851b86a 100644
--- a/src/art/webgl/art.js
+++ b/src/art/webgl/art.js
@@ -1153,9 +1153,9 @@ App.Art.applyMaterials = function(slave, scene, p) {
 	let sqDO = (D[0] - O[0])**2 + (D[1] - O[1])**2 + (D[2] - O[2])**2;
 
 	// factor to multiply skintone texture to get expected skin color
-	let mA = [O[0]/A[0], O[1]/A[1], O[2]/A[2]];
+	let mA = [O[0]/A[0]*0.92, O[1]/A[1]*0.88, O[2]/A[2]*0.88];
 	let mB = [O[0]/B[0], O[1]/B[1], O[2]/B[2]];
-	let mC = [O[0]/C[0]*0.84, O[1]/C[1]*0.84, O[2]/C[2]*0.84];
+	let mC = [O[0]/C[0], O[1]/C[1], O[2]/C[2]];
 	let mD = [O[0]/D[0], O[1]/D[1], O[2]/D[2]];
 
 	let lA = [lipsColor[0]/A[0], lipsColor[1]/A[1], lipsColor[2]/A[2]];
@@ -1176,7 +1176,7 @@ App.Art.applyMaterials = function(slave, scene, p) {
 		materials.push(["WhiteToneFace", "Ks", S]);
 		materials.push(["WhiteToneEars", "Kd", mA]);
 		materials.push(["WhiteToneEars", "Ks", S]);
-		materials.push(["WhiteToneLips", "Kd", [lA[0]*0.8, lA[1]*0.8, lA[2]*0.8]]);
+		materials.push(["WhiteToneLips", "Kd", [lA[0]*0.9, lA[1]*0.9, lA[2]*0.9]]);
 		materials.push(["WhiteToneLips", "Ns", lipsGloss]);
 		materials.push(["WhiteToneFingernails", "Kd", nailColor]);
 		materials.push(["WhiteToneFingernails", "Ks", S]);
diff --git a/src/art/webgl/ui.js b/src/art/webgl/ui.js
index 0534df47e67..2f6d90315a4 100644
--- a/src/art/webgl/ui.js
+++ b/src/art/webgl/ui.js
@@ -174,8 +174,9 @@ App.Art.createWebglUI = function(container, slave, artSize, scene, p) {
 			break;
 	}
 
-	cvs.width = sz[0];
-	cvs.height = sz[1];
+	let zoom = Math.max(1, window.devicePixelRatio);
+	cvs.width = sz[0] * zoom;
+	cvs.height = sz[1] * zoom;
 	container.setAttribute("style", "position: relative; width: " + sz[0] + "px; height: " + sz[1] + "px;");
 
 	if(typeof V.setSuperSampling === "undefined") {
@@ -191,6 +192,11 @@ App.Art.createWebglUI = function(container, slave, artSize, scene, p) {
 	scene.settings.reinhard = true;
 	scene.settings.whiteM = 1.20;
 
+	if (!V.setColorBurn) {
+		scene.settings.whiteM = 1.30;
+		scene.directionalLights[0].intensity = 1.15;
+	}
+
 	App.Art.engine.render(scene, cvs);
 
 	/*
-- 
GitLab