Skip to content

Commit

Permalink
Fix for normal color to be in linear
Browse files Browse the repository at this point in the history
  • Loading branch information
memelotsqui committed Nov 19, 2024
1 parent dce68ba commit 1187e9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/library/create-texture-atlas.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 1187e9b

Please sign in to comment.