Skip to content

Expanded texture APIs #254

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

Open
wants to merge 33 commits into
base: 1.20
Choose a base branch
from

Conversation

penguinencounter
Copy link
Contributor

@penguinencounter penguinencounter commented Aug 21, 2024

4P5's feature request: Thread
DogeIsCut's feature request: Thread

Feature List

  • Texture:multiply(Texture, x, y, w, h), :add, :subtract, :divide
  • Texture:resize(outputName, x, y, mode)
  • Texture:invert(x, y, w, h, invertAlpha?)
  • Texture:blit(options)
  • Texture:setWrapMode(mode) Texture:setOverflowMode(mode)
    • error (default)
    • ignore (aka discard)
    • wrap
    • mirror
    • clamp
  • Texture:getOverflowMode()
  • Texture:line(x1, y1, x2, y2, color)
  • Texture:remapColors(from, to)
  • Texture:applyMatrix: remove clip
  • add getWidth(): int, getHeight(): int to Lua allowlist

Bug fixes too

  • Clamp input color vectors between 0-1 to prevent overflowing into other channels
  • fill diverges between 1.20 and 1.21.4 (probably 1.21.3)

Finishing touches

  • Documentation
  • Test for edge cases and weird combinations of things (also how the 'restore' function handles these)

Live GitHub Actions (1.20)

All branches (cherry-pick): Multitarget build
most branches which have diverged significantly from 1.20 have merge conflicts, sorry paladin

@penguinencounter penguinencounter force-pushed the moretextures branch 3 times, most recently from c673316 to 4d5a611 Compare September 13, 2024 05:21
@penguinencounter penguinencounter marked this pull request as ready for review September 18, 2024 06:09
@penguinencounter

This comment has been minimized.

@UnlikePaladin
Copy link
Member

mfw when testing

@UnlikePaladin
Copy link
Member

do mark it as ready when it's ready cause like otherwise how will I know

@penguinencounter
Copy link
Contributor Author

look, for this one I did test all of the features, i don't have like a full avatar that uses a bunch of them at the same time in weird edge-case ways

@penguinencounter penguinencounter marked this pull request as draft February 24, 2025 22:07
@UnlikePaladin
Copy link
Member

oh okay, just mark it as ready for review when you think it's ready to be merged

@penguinencounter
Copy link
Contributor Author

i want to throw pallete swapping functionality on top of this because it's in the same general area before it gets merged if that's okay with you

(there's a separate feature request for this)

@UnlikePaladin
Copy link
Member

Okay, that's fine by me 👍🏻

@penguinencounter
Copy link
Contributor Author

Screenshot 2025-03-17 at 22-50-45 Showcase

@penguinencounter penguinencounter marked this pull request as ready for review March 18, 2025 05:52
- remove applyFilter because of performance issues and general 'who would ever use this'
- remove FlexibleMatrix and FlexibleVector because they are now unused and maybe another PR should implement them instead
moves & renames BlendMode to be outside BlitOptions
contains cursed dispatcher. someone please redesign @LuaWhitelist to support overloads thanks
(in applyFunc/applyMatrix where we already have the Actual Position from the Virtual Position)
also i can't get my dev env to work right now hold on
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.

2 participants