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

Fix custom shader output #2105

Closed
wants to merge 1 commit into from
Closed

Conversation

rh101
Copy link
Contributor

@rh101 rh101 commented Aug 27, 2024

Describe your changes

The batch ID and program ID should be uint64_t, but in places they were being used as int64_t, causing incorrect results of conditional statements that check if batching should be enabled.

This fixes the issue of incorrect output when the same custom shader is used on multiple sprites.

Issue ticket number and link

#2104

Checklist before requesting a review

For each PR

  • Add Copyright if it missed:
    - "Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md)."

  • I have performed a self-review of my code.

    Optional:

    • I have checked readme and add important infos to this PR.
    • I have added/adapted some tests too.

For core/new feature PR

  • I have checked readme and add important infos to this PR.
  • I have added thorough tests.

@rh101
Copy link
Contributor Author

rh101 commented Aug 27, 2024

The changes made in this PR may not be correct, and are not actually required, and the correct solution is to simply call ProgramState::updateBatchId() when the uniforms are updated for a specific program state.

@rh101 rh101 closed this Aug 27, 2024
@rh101 rh101 deleted the fix-issue2104 branch August 27, 2024 13:25
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

Successfully merging this pull request may close these issues.

1 participant