Skip to content

More optimal shaders and drawing#91

Open
AntonPetrov83 wants to merge 43 commits intoGamesRightMeow:mainfrom
AntonPetrov83:feature/graphics-rework
Open

More optimal shaders and drawing#91
AntonPetrov83 wants to merge 43 commits intoGamesRightMeow:mainfrom
AntonPetrov83:feature/graphics-rework

Conversation

@AntonPetrov83
Copy link

@AntonPetrov83 AntonPetrov83 commented Feb 10, 2026

DISCLAIMER: I have made this PR on top of my previous fixes that is why it may look huge. But in fact this PR brings only three new commits (starting with 0a91192) touching 6 or so lua files. I can re-arrange commits later if needed.

Resolves #80

What was done:

  1. Removed runtime conditions (if ... else) from the fragment shader.
  2. Split shader into a few small shaders for simplicity.
  3. Drawing color is a uniform constant (see color.glsl) this allowed to remove a lot of getColor()/setColor calls.
  4. Set one of three drawing modes (line, fill, image) just before calling drawing functions of Love only if the mode changed (!!!).

Anton Petrov added 30 commits January 29, 2026 10:03
PD just skips invalid tiles.
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.

Suggestion to improve shader and graphics design

1 participant