-
Notifications
You must be signed in to change notification settings - Fork 157
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
Optimize palette lookup #43
Comments
That's an interesting idea! Do you think this would be faster than doing the palette texture lookup? I'm guessing yes but I'm not sure. About texture1D, I don't think it's supported in WebGL. |
Yes, definitely. Dependent random texture reads pretty expensive, especially on mobile phones
Yeah, totally forget about that. |
Sounds great, a PR would be very welcome 😄 |
If anyone has a desire to do PR, feel free to do so =) |
I see palette uses texture2D texture now. What about change it to texture1D? While wasm4 support only 4 palette slots (2-bit palette) I guess it could be even simpler approach and pass this four colours via 4 uniforms and use something like this:
The text was updated successfully, but these errors were encountered: