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

Configure the linear interpolation of any sampler2D uniform #54

Closed
gre opened this issue Feb 17, 2016 · 1 comment
Closed

Configure the linear interpolation of any sampler2D uniform #54

gre opened this issue Feb 17, 2016 · 1 comment

Comments

@gre
Copy link
Owner

gre commented Feb 17, 2016

linear interpolation can be defined on almost everything: textures, content and fbos.
so we should be able to define a disableLinearInterpolation: true prop on a GL.Uniform or attached in a {value, opts: { disableLinearInterpolation: true }} object, like it's already possible for ndarray in DOM impl: https://github.com/ProjectSeptemberInc/gl-react-dom/blob/601180581a461760f541ee459552df9b8d2c52ef/Examples/Simple/Colorify.js#L36 / https://github.com/ProjectSeptemberInc/gl-react-dom/blob/6e4b9f4a8eb0045977c643a4920651082cb36fcb/Examples/Tests/index.js#L102-L111

use case:
you have a HelloGL 2x2 and you want to scale up to 200x200 but without linear interpolation so you preserve the 4 pixels in the display

@gre
Copy link
Owner Author

gre commented Dec 3, 2016

This is now solved in gl-react v3 ! It's a complete rewrite.

Relevant example that show this issue is fixed: https://gl-react-cookbook.surge.sh/pixeleditor & others

@gre gre closed this as completed Dec 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant