Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The value of the HSV channel color is ignored during blending #490

Closed
andreasg123 opened this issue Aug 20, 2021 · 2 comments · Fixed by #491
Closed

The value of the HSV channel color is ignored during blending #490

andreasg123 opened this issue Aug 20, 2021 · 2 comments · Fixed by #491
Labels
bug Something isn't working

Comments

@andreasg123
Copy link
Contributor

Describe the bug
In blending channel colors, the assigned channel color is converted to HSV and then V is replaced by the intensity.

https://github.com/hms-dbmi/viv/blob/master/src/layers/XRLayer/shader-modules/channel-intensity.glsl#L78-L91

This removes the effect of assigning darker channel colors, e.g., rgb(0,128,0), to achieve a more perceptually uniform display.

To Reproduce
Change a channel color from rgb(0,255,0) to rgb(0,128,0). The resulting display does not change.

Expected behavior
The V component of the HSV color should be multiplied by the intensity clamped at 1. The resulting display should be darker if a darker channel color is assigned.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment:

  • Release or git hash: 0.10.3
  • Browser: macOS Chrome
  • Browser version: 92.0.4515.159
@andreasg123 andreasg123 added the bug Something isn't working label Aug 20, 2021
@ilan-gold
Copy link
Collaborator

@andreasg123 That makes sense, thanks for catching this. You're welcome to implement a fix, otherwise I will do it on Monday (or sooner) and ping you.

@andreasg123
Copy link
Contributor Author

I can create a PR. However, I have to figure out first how to get around the issue that Next.js has with Viv 0.10.5: #303 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants