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

Add OpenGL Color Format Support #123

Open
cadupuy opened this issue Jul 13, 2024 · 3 comments
Open

Add OpenGL Color Format Support #123

cadupuy opened this issue Jul 13, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@cadupuy
Copy link

cadupuy commented Jul 13, 2024

Hello !

First of all, thank you for creating such a fantastic tool! I have a suggestion that I believe could make Pika even more awesome :
It would be great to have an option to output colors in the OpenGL format (r, g, b, a), where each component ranges from 0.0 to 1.0. This feature would be incredibly useful for those of us working in graphics programming and game development.


Benefits:

  1. Expanded Use Cases: Pika would become even more valuable for developers in graphics and gaming.
  2. Time-Saving: Directly using OpenGL values without manual conversion would streamline workflows.
  3. Enhanced Flexibility: Offering multiple color formats increases Pika’s versatility.

Thank you for considering this addition. Keep up the excellent work!

@cadupuy cadupuy added the enhancement New feature or request label Jul 13, 2024
@cadupuy cadupuy closed this as completed Jul 14, 2024
@superhighfives
Copy link
Owner

Is this what you had in mind, @cadupuy?

image

Also, what level of precision for the decimal points would make the most sense? 0.00? 0.000? Pika doesn't handle transparencies, so I've hardcoded 1.0 for the alpha.

Let me know what you think, and thanks for the suggestion!

@cadupuy
Copy link
Author

cadupuy commented Jul 16, 2024

The integration, as shown in the screenshot, is well done. The issue with decimals is somewhat variable. Ideally, it would be great to have an option to adjust the precision if necessary, but that might require too many modifications on your part.

For example, in some cases, like with the color red, only one decimal place would be necessary: vec4(1.0, 0.0, 0.0, 1.0).
However, for other colors, it would be important to have up to six decimal places: vec4(0.123456, 0.234567, 0.345678).

Moreover, there would be no need to manage transparency. The alpha parameter can always be set to a value of 1.0. Transparency is typically handled directly within the code.

Thank you again for considering this and for your prompt response!

@superhighfives
Copy link
Owner

Thanks @cadupuy.

I think the main thing I'll need to think about is this one:

For example, in some cases, like with the color red, only one decimal place would be necessary: vec4(1.0, 0.0, 0.0, 1.0).
However, for other colors, it would be important to have up to six decimal places: vec4(0.123456, 0.234567, 0.345678).

Will do some noodling, and planning to get a beta up soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants