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

Feature request: packing/unpacking varyings #77

Closed
rraallvv opened this issue Dec 25, 2014 · 2 comments
Closed

Feature request: packing/unpacking varyings #77

rraallvv opened this issue Dec 25, 2014 · 2 comments

Comments

@rraallvv
Copy link

It could be added an option to pack/unpack varyings to be able to surpass the 8 varyings limitation in some devices. For instance four floats into one vec4, two vec2 into one vec4, and so on.

@bkaradzic
Copy link
Contributor

You can completely avoid using anything smaller than vec4 in your shaders by using something like:

uniform vec4 u_params;
#define u_time u_params.x
#define u_foo  u_params.yz
#define u_bar  u_params.w

@rraallvv
Copy link
Author

@bkaradzic Thanks, that would do the trick... I think I'm going to close this request.

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

No branches or pull requests

2 participants