From 1187e9b4a815cc19b16a539ecb12297404da1b43 Mon Sep 17 00:00:00 2001 From: memelotsqui Date: Mon, 18 Nov 2024 19:33:38 -0600 Subject: [PATCH] Fix for normal color to be in linear --- src/library/create-texture-atlas.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/library/create-texture-atlas.js b/src/library/create-texture-atlas.js index e63cdf43..aec47c4b 100644 --- a/src/library/create-texture-atlas.js +++ b/src/library/create-texture-atlas.js @@ -130,7 +130,7 @@ export const createTextureAtlasNode = async ({ meshes, atlasSize, mtoon, transpa } } else { - context.fillStyle = name === 'diffuse' ? `#${material.color.clone().getHexString()}` : name === 'normal' ? '#8080ff' : name === 'orm' ? + context.fillStyle = name === 'diffuse' ? `#${material.color.clone().getHexString()}` : name === 'normal' ? '#bcbcff' : name === 'orm' ? `#${(new THREE.Color(material.aoMapIntensity, material.roughness, material.metalness)).getHexString()}` : '#7F7F7F'; context.fillRect(min.x * ATLAS_SIZE_PX, min.y * ATLAS_SIZE_PX, xTileSize, yTileSize); } @@ -425,7 +425,7 @@ export const createTextureAtlasBrowser = async ({ backColor, includeNonTexturedM } break; case 'normal': - clearColor = new THREE.Color(0x8080FF); + clearColor = new THREE.Color(0xbcbcff); break; case 'orm': clearColor = new THREE.Color(0, material.roughness, material.metalness);