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

API for changing mag-filter of render target texture? #13

Open
Erkaman opened this issue Apr 15, 2016 · 1 comment
Open

API for changing mag-filter of render target texture? #13

Erkaman opened this issue Apr 15, 2016 · 1 comment

Comments

@Erkaman
Copy link
Member

Erkaman commented Apr 15, 2016

Right now, you cannot specify the mag-filter of the render target color texture of the fbo in the API. But I think it would be useful if you could do that. My use case of that would be the following: In order to save performance, I am rendering to an FBO that is half the size of the screen(instead of the full screen size). I then use that FBO in a fullscreen pass in a shader. But since the mag-filter is always GL_NEAREST, this results in terrible artefacts(notice the artefacts in the bottom):

screen shot 2016-04-15 at 23 56 48

But if I change the mag-filter to GL_LINEAR, the problem is solved:

screen shot 2016-04-15 at 23 57 00

For this reason, I think it would be good if you could change the mag-filter through the API. Is it possible to add this feature to the API?

@mikolalysenko
Copy link
Member

You can directly modify those filters on the textures using the API from gl-texture2D.

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