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

Implement anisotropic filtering for screen 2x/3x/4x #120

Closed
ghost opened this issue Dec 3, 2012 · 2 comments
Closed

Implement anisotropic filtering for screen 2x/3x/4x #120

ghost opened this issue Dec 3, 2012 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 3, 2012

Implement anisotropic filtering for screen 2x/3x/4x using GL_EXT_texture_filter_anisotropic

@ghost
Copy link
Author

ghost commented Dec 4, 2012

I am very new to Multisample FBO .I drafted some codes and if anybody can help to make it working would be appreciated

//Create normal fbo
glGenFramebuffersEXT(1, &fbo);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, backbufTex, 0);

//Create multisample color buffer
glGenRenderbuffersEXT(1, &colorbuffer);
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, colorbuffer);
glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, 8, GL_RGBA8, 480, 272);

//Create multisample depth buffer
glGenRenderbuffersEXT(1, &depthbuffer);
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, depthbuffer);
glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, 8, GL_DEPTH_COMPONENT, 480, 272);

//Create multisample fbo and bind color+depth buffer altogther.
glGenFramebuffersEXT(1, &mfbo);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, mfbo);
glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT, colorbuffer);
glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, depthbuffer);

glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, mfbo);

glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, mfbo);
glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, fbo);
glBlitFramebufferEXT(0, 0, 480, 272, 0, 0, 480, 272, GL_COLOR_BUFFER_BIT, GL_NEAREST);

@ghost ghost closed this as completed Mar 10, 2013
@hrydgard
Copy link
Owner

Hm, this issue seems to be about two things, the title says aniso filter, and the code is about multisampling :)

Aniso we already do, but multisampling is a legitimate feature request, it would be quite nice to have. It's a little complicated due to the way the PSP manages its buffers though, we need a "shadow" multisample FBO for every framebuffer and also need to "resolve" them to non-multisampled surfaces at the right times. It's not super complicated but it will be a bit of work to get right.

Could open a new issue for that.

@hsoftxl hsoftxl mentioned this issue Mar 7, 2024
6 tasks
This issue was closed.
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

1 participant