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

Polygon triangulation renderer #103

Open
2 of 5 tasks
Jerboa-app opened this issue Aug 31, 2023 · 2 comments
Open
2 of 5 tasks

Polygon triangulation renderer #103

Jerboa-app opened this issue Aug 31, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@Jerboa-app
Copy link
Collaborator

Jerboa-app commented Aug 31, 2023

  • port triangulation code
  • refactor sRender to use sSpriteRender
  • polygon component
  • implement sDynamicSpriteRender to use polygon components
  • pass to sRender to render rigged objects

Rigging polygon can be any polygon + triangulation
Routines to construct one from collision mesh/ v.v.

sRender will take in sprites as current, and rigged renderables as well

sSpriteRender will take in sprite renderables (as all were before)
sDynamicSpriteRender will take in those that also have riggin polygons
sRender will be an interface to use both seamlessly

@Jerboa-app Jerboa-app added the enhancement New feature or request label Aug 31, 2023
@Jerboa-app
Copy link
Collaborator Author

Jerboa-app commented Sep 1, 2023

Sprite

Dynamic components

  • Shader/s
  • Texture/s

Fixed size object (can have render frames though)

  • Quad (pos and tex coords)
  • translation (vec4)
  • colour (vec4)
  • atlas coords (vec4)
  • util (vec4

ProceduralSprite

Dynamic sized components

  • Triangulation pos coords - gets changed as object shifts, N = n * 3 * 2
  • Triangulation tex coords - static for uv mapping, N
  • Colour, N

Fixed size components

  • Atlas coords (vec4)
  • Util (vec4)

@Jerboa-app
Copy link
Collaborator Author

#105 sRender now interfaces with sSpriteRender for functionality

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

1 participant