From 7da4a85459572f50c99107d553075750a60c7f66 Mon Sep 17 00:00:00 2001 From: giagitom Date: Tue, 19 May 2026 16:43:00 +0200 Subject: [PATCH] Fix cel-shaded ambient color being stripped to luminance --- CHANGELOG.md | 1 + src/mol-gl/shader/chunks/apply-light-color.glsl.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cdf9bd44..f5a7b7592 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file, following t Note that since we don't clearly distinguish between a public and private interfaces there will be changes in non-major versions that are potentially breaking. If we make breaking changes to less used interfaces we will highlight it in here. ## [Unreleased] +- Fix cel-shaded ambient color being stripped to luminance (now uses full RGB, matching the classic lighting path) - Fix empty transforms default in `ShapeFromPly` - Use morton order for spheres in dot visual with lod-levels - Add `Camera.changed` event and rotation/translation setter/getter diff --git a/src/mol-gl/shader/chunks/apply-light-color.glsl.ts b/src/mol-gl/shader/chunks/apply-light-color.glsl.ts index 626fae8c0..b3b58cdfb 100644 --- a/src/mol-gl/shader/chunks/apply-light-color.glsl.ts +++ b/src/mol-gl/shader/chunks/apply-light-color.glsl.ts @@ -78,7 +78,7 @@ export const apply_light_color = ` } #pragma unroll_loop_end - outgoingLight += physicalMaterial.diffuseColor * luminance(uAmbientColor); + outgoingLight += physicalMaterial.diffuseColor * uAmbientColor; #else ReflectedLight reflectedLight = ReflectedLight(vec3(0.0), vec3(0.0), vec3(0.0), vec3(0.0));