fix: Color picker aligned with actual color in 'Smoky Triangle'#2342
fix: Color picker aligned with actual color in 'Smoky Triangle'#2342cieplypolar wants to merge 4 commits intomainfrom
Conversation
|
pkg.pr.new packages benchmark commit |
📊 Bundle Size Comparison
👀 Notable resultsStatic test results:No major changes. Dynamic test results:No major changes. 📋 All resultsClick to reveal the results table (349 entries).
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu. |
There was a problem hiding this comment.
Pull request overview
This PR fixes the “Smoky Triangle” example’s To Color control so the color picker’s displayed initial color matches the actual rendered color, despite the shader using HDR-ish toColor values (> 1) internally.
Changes:
- Introduces separate initial values for the uniform buffer (
initialToColorBuffer) vs. the UI color picker (initialToColorPicker). - Adds a special-case in
onColorChangeto write the HDR buffer value during initial control initialization.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I think I would rather limit the color buffer value to a normalized vector, and multiply it in the shader. |
I don't understand. |
Before:

After:
