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

Inaccurate Blending Calculations in Pixi Spine #532

Open
PioneerRedwood opened this issue Nov 8, 2023 · 0 comments
Open

Inaccurate Blending Calculations in Pixi Spine #532

PioneerRedwood opened this issue Nov 8, 2023 · 0 comments

Comments

@PioneerRedwood
Copy link

Bug Report: Inaccurate Blending Calculations in Pixi Spine

Dear Pixi Spine Team,

I hope this message finds you well. I am writing to report a bug related to inaccurate blending calculations in Pixi Spine, specifically when dealing with RGB to hex conversion involving floating-point numbers with precision beyond the decimal point.

Bug Description

When utilizing Pixi Spine to convert RGB values represented as floating-point numbers with high precision (e.g., 13 decimal places) to hexadecimal values, the blending calculations seem to be inaccurate. This issue affects the accuracy of color blending and can result in incorrect rendering in certain scenarios.

Steps to Reproduce

  1. Use Pixi Spine to convert RGB values with precision beyond the decimal point (e.g., 0.1234567890123, 0.9876543210987, 0.1111111111111) to hexadecimal values using the rgb2hex function.
  2. Observe the hexadecimal values generated and compare them to the expected values based on accurate blending calculations.

Expected Behavior

The RGB to hexadecimal conversion should accurately handle floating-point numbers with high precision, ensuring correct blending calculations and rendering in Pixi Spine.

Actual Behavior

The current implementation seems to struggle with maintaining accuracy when dealing with floating-point numbers beyond a certain precision, leading to incorrect blending and rendering results.

Additional Information

This issue can lead to visual artifacts and discrepancies in color blending, impacting the overall quality of the rendered graphics in Pixi Spine applications.

Environment

  • Pixi Spine version: v1.5.18
  • Pixi version: v4.7.0

Proposed Solution

I recommend reviewing the RGB to hexadecimal conversion logic in Pixi Spine, especially when handling floating-point numbers with high precision. Implementing more precise algorithms or ensuring accurate rounding methods could potentially resolve this issue and enhance the overall rendering accuracy.

Please let me know if you require any additional information or if there are specific steps I can take to assist further in resolving this problem. Thank you for your attention to this matter, and I appreciate your efforts in continuously improving Pixi Spine.

Best regards, Chris Redwood

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

No branches or pull requests

1 participant