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

Proof-of-concept: Instanced rendering #82

Merged

Conversation

codyebberson
Copy link
Contributor

@codyebberson codyebberson commented Jul 9, 2024

See discussion #78

This is a quick-and-dirty proof-of-concept of using instanced rendering to draw sprites.

Before: https://killedbyapixel.github.io/LittleJS/examples/stress/

After: https://codyebberson.github.io/LittleJS/examples/stress/

Pros: Faster, less data sent to GPU per frame

Cons: Not compatible with glDrawPoints or glRenderPostProcess - to use both instanced rendering and preserve backwards compatibility would require additional shaders.

@codyebberson codyebberson mentioned this pull request Jul 9, 2024
@KilledByAPixel
Copy link
Owner

Fantastic work, Cody! I am checking this out now. Im sure I can get the post process working again, we can cut gldraw points as a feature if necessary, i had only added it because it fit so naturally with the old method.

I will fix up the post process to work.

@KilledByAPixel
Copy link
Owner

It seems to work great already so I'm going to pull this all in then go through and make any small changes i want and fix the post processing and cut the glDrawPoints.

@KilledByAPixel KilledByAPixel merged commit fdd6bae into KilledByAPixel:main Jul 9, 2024
1 check passed
KilledByAPixel added a commit that referenced this pull request Jul 9, 2024
@codyebberson codyebberson deleted the cody-instanced-rendering branch September 1, 2024 21:16
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