[GH-ISSUE #3999] Feature: Cheap multisampling on TBRs #1626

Closed
opened 2026-03-18 01:48:15 +03:00 by kerem · 18 comments
Owner

Originally created by @hrydgard on GitHub (Sep 30, 2013).
Original GitHub issue: https://github.com/hrydgard/ppsspp/issues/3999

Tile based renderers like Mali and PowerVR can do super-cheap MSAA per tile (thus, doesn't require a final resolve like on PC) using this extension:

GL_EXT_multisampled_render_to_texture

http://www.khronos.org/registry/gles/extensions/EXT/EXT_multisampled_render_to_texture.txt

We could add support for that pretty easily.

For multisampling on PC we have to write a bit more complicated code and keep track of two FBOs for every framebuffer. Not super difficult, but a bit more work.

Originally created by @hrydgard on GitHub (Sep 30, 2013). Original GitHub issue: https://github.com/hrydgard/ppsspp/issues/3999 Tile based renderers like Mali and PowerVR can do super-cheap MSAA per tile (thus, doesn't require a final resolve like on PC) using this extension: GL_EXT_multisampled_render_to_texture http://www.khronos.org/registry/gles/extensions/EXT/EXT_multisampled_render_to_texture.txt We could add support for that pretty easily. For multisampling on PC we have to write a bit more complicated code and keep track of two FBOs for every framebuffer. Not super difficult, but a bit more work.
Author
Owner

@danyalziakhan commented on GitHub (Oct 1, 2013):

We can also use GLSL custom shaders, at least for windows. I'm just integrating shaders from epsxe into PPSSPP, so stay tuned :)

<!-- gh-comment-id:25467645 --> @danyalziakhan commented on GitHub (Oct 1, 2013): We can also use GLSL custom shaders, at least for windows. I'm just integrating shaders from epsxe into PPSSPP, so stay tuned :)
Author
Owner

@thedax commented on GitHub (Oct 1, 2013):

@DanyalZia: Won't you pretty much have to rewrite them all? I know little about shaders, but when I tried them they basically gave a black screen(I tried to make a couple use the proper uniforms and whatnot, but no luck).

<!-- gh-comment-id:25467840 --> @thedax commented on GitHub (Oct 1, 2013): @DanyalZia: Won't you pretty much have to rewrite them all? I know little about shaders, but when I tried them they basically gave a black screen(I tried to make a couple use the proper uniforms and whatnot, but no luck).
Author
Owner

@danyalziakhan commented on GitHub (Oct 1, 2013):

@thedax No, not pretty much just some change in variables, for instance, using sampler0 (which is defined in PPSSPP) instead of OGL2Texture (which is defined in epsxe plugin). I have actually successfully done with implementing "Natural" shader from epsxe. Here are the results:

Without shader:
screen00012

With shader:
screen00011

Natural smoothes the objects and enhance contrast.

<!-- gh-comment-id:25468587 --> @danyalziakhan commented on GitHub (Oct 1, 2013): @thedax No, not pretty much just some change in variables, for instance, using sampler0 (which is defined in PPSSPP) instead of OGL2Texture (which is defined in epsxe plugin). I have actually successfully done with implementing "Natural" shader from epsxe. Here are the results: Without shader: ![screen00012](https://f.cloud.github.com/assets/4582691/1247308/65f0e590-2aba-11e3-80e1-464a8e3d4eba.jpg) With shader: ![screen00011](https://f.cloud.github.com/assets/4582691/1247364/2ce02d0a-2abb-11e3-8928-3851c128b766.jpg) Natural smoothes the objects and enhance contrast.
Author
Owner

@thedax commented on GitHub (Oct 1, 2013):

Did you use the vp/fp or slv/slf files? Sorry for going off-topic, this'll be my last post asking about it on this issue.

<!-- gh-comment-id:25472202 --> @thedax commented on GitHub (Oct 1, 2013): Did you use the vp/fp or slv/slf files? Sorry for going off-topic, this'll be my last post asking about it on this issue.
Author
Owner

@danyalziakhan commented on GitHub (Oct 1, 2013):

@thedax slv/slf files since they are supported. vp/fp are ARB program. (Sorry for replying late, the server was down)

<!-- gh-comment-id:25472825 --> @danyalziakhan commented on GitHub (Oct 1, 2013): @thedax slv/slf files since they are supported. vp/fp are ARB program. (Sorry for replying late, the server was down)
Author
Owner

@thedax commented on GitHub (Oct 1, 2013):

Thanks. I'll see if I can port any for fun.

<!-- gh-comment-id:25473365 --> @thedax commented on GitHub (Oct 1, 2013): Thanks. I'll see if I can port any for fun.
Author
Owner

@danyalziakhan commented on GitHub (Oct 1, 2013):

@thedax I'm just sending a pull request with just Natural please tell me if you can port more shaders :)

<!-- gh-comment-id:25473801 --> @danyalziakhan commented on GitHub (Oct 1, 2013): @thedax I'm just sending a pull request with just Natural please tell me if you can port more shaders :)
Author
Owner

@thedax commented on GitHub (Oct 1, 2013):

Feel free to send it, I'm still scratching my head with trying to port Natural(as a first/hello world type thing, to I can see if I can even do this or not).

<!-- gh-comment-id:25476347 --> @thedax commented on GitHub (Oct 1, 2013): Feel free to send it, I'm still scratching my head with trying to port Natural(as a first/hello world type thing, to I can see if I can even do this or not).
Author
Owner

@danyalziakhan commented on GitHub (Oct 1, 2013):

@thedax I've just send a pull request. Feel free to see it :)

<!-- gh-comment-id:25478245 --> @danyalziakhan commented on GitHub (Oct 1, 2013): @thedax I've just send a pull request. Feel free to see it :)
Author
Owner

@hrydgard commented on GitHub (Oct 1, 2013):

Why are you talking about GLSL shaders here? They have nothing to do with MSAA (multisample antialiasing).

<!-- gh-comment-id:25479625 --> @hrydgard commented on GitHub (Oct 1, 2013): Why are you talking about GLSL shaders here? They have nothing to do with MSAA (multisample antialiasing).
Author
Owner

@thedax commented on GitHub (Oct 1, 2013):

Sorry. Feel free to remove the offtopic posts if you like. I won't mention it again in here.

<!-- gh-comment-id:25480247 --> @thedax commented on GitHub (Oct 1, 2013): Sorry. Feel free to remove the offtopic posts if you like. I won't mention it again in here.
Author
Owner

@hrydgard commented on GitHub (Oct 1, 2013):

Too lazy to remove it. Feel free to start a new issue though :)

<!-- gh-comment-id:25480329 --> @hrydgard commented on GitHub (Oct 1, 2013): Too lazy to remove it. Feel free to start a new issue though :)
Author
Owner

@bollu commented on GitHub (Oct 2, 2013):

Also, android can force 4x MSAA (one of the dev mode options). Can that be leveraged in any way?

<!-- gh-comment-id:25552529 --> @bollu commented on GitHub (Oct 2, 2013): Also, android can force 4x MSAA (one of the dev mode options). Can that be leveraged in any way?
Author
Owner

@hrydgard commented on GitHub (Oct 2, 2013):

That probably works the same way internally as what this extension can do.

<!-- gh-comment-id:25556281 --> @hrydgard commented on GitHub (Oct 2, 2013): That probably works the same way internally as what this extension can do.
Author
Owner

@xsacha commented on GitHub (Oct 17, 2013):

Adreno is a tile-based renderer but doesn't seem to have this GLES extension?

<!-- gh-comment-id:26485057 --> @xsacha commented on GitHub (Oct 17, 2013): Adreno is a tile-based renderer but doesn't seem to have this GLES extension?
Author
Owner

@hrydgard commented on GitHub (Oct 17, 2013):

I think adreno is not a "classic" tilebased rasterizer like PowerVR but something in the middle. Also, of course there's no guarantee that a particular driver exposes a particular extension even if the hardware is technically capable.

<!-- gh-comment-id:26488266 --> @hrydgard commented on GitHub (Oct 17, 2013): I think adreno is not a "classic" tilebased rasterizer like PowerVR but something in the middle. Also, of course there's no guarantee that a particular driver exposes a particular extension even if the hardware is technically capable.
Author
Owner

@unknownbrackets commented on GitHub (Dec 21, 2015):

There are Adreno 3xx and 4xx drivers reporting support for this, it seems. Note GL_IMG_multisampled_render_to_texture and GL_EXT_multisampled_render_to_texture.

Would we need the second FBO on desktop in order to resolve? Would we only need this for depal and block transfers, or always? Trying to understand more about multisampling.

Theoretically, it sounds like this could be quite beneficial for a lot of users who are willing to have a lower display resolution but want better internal resolution, right?

-[Unknown]

<!-- gh-comment-id:166213944 --> @unknownbrackets commented on GitHub (Dec 21, 2015): There are Adreno 3xx and 4xx drivers reporting support for this, it seems. Note GL_IMG_multisampled_render_to_texture and GL_EXT_multisampled_render_to_texture. Would we need the second FBO on desktop in order to resolve? Would we only need this for depal and block transfers, or always? Trying to understand more about multisampling. Theoretically, it sounds like this could be quite beneficial for a lot of users who are willing to have a lower display resolution but want better internal resolution, right? -[Unknown]
Author
Owner

@hrydgard commented on GitHub (Dec 22, 2015):

Closing in favor of #6218 which is more general.

<!-- gh-comment-id:166563347 --> @hrydgard commented on GitHub (Dec 22, 2015): Closing in favor of #6218 which is more general.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ppsspp#1626
No description provided.