Yabause / yabause

Yabause is a Sega Saturn emulator.
http://yabause.org
352 stars 194 forks source link

[Feature Request] Increase of Resolution and Texture Filtering #16

Open Papermanzero opened 8 years ago

Papermanzero commented 8 years ago

Hi Yabause team, your emulator is meanwhile in my opinion the best saturn emulator. However I have a request concerning the upscaling and filtering. Most of the modern emulators like mupen64plus, pcsx-reloaded, dolphin, pcsx2 etc. can increase the internal system resolution to a certain value (x2, x2.5, x3...) with Anti-Aliasing or without. This would be convenient for several reasons. The OpenGL renderer already increases the internal resolution to a certain value. However some persons tend to prefer to use the original resolution and other would like to increase the resolution even higher (with Anti-Aliasing). The demand of both groups can be satisfied, if you enable a free selection of the internal resolution scaling value. Furthermore a filter for the textures is really necessary to play games on higher resolutions especially on HDTVs. A bilinear, 2xSai, hq4x etc. would therefore be great. At least a bilinear filter would already improve the textures a lot. Alternatively you can implement shader functionality (stackable shaders, like Demul), which will take over the filtering and the possible Anti-Aliasing. Maybe the filters of the other open source emulators can be supportive.

ADormant commented 8 years ago

Newer OpenGL would allow for a better filtering but even with the old OpenGL it should be doable.

https://github.com/PCSX2/pcsx2/commit/f37ef105c5e0d728356b9c0bc715c271d437ff4b https://www.opengl.org/wiki/Sampler_Object https://www.opengl.org/registry/specs/EXT/texture_filter_anisotropic.txt https://www.opengl.org/wiki/GLAPI/glTexParameter https://www.opengl.org/wiki/GLAPI/glTexImage2D Peops OpenGL plugin with biliinear texture filtering. https://github.com/mirror/pcsxr/tree/master/plugins/peopsxgl http://www.learnopengles.com/android-lesson-six-an-introduction-to-texture-filtering/ http://www.gamedev.net/topic/253878-bilineartrilinear-filtering/ https://www.opengl.org/discussion_boards/showthread.php/177090-Custom-Bilinear-filtering-w-textureGather-problem https://www.opengl.org/discussion_boards/showthread.php/168506-manual-bilinear-filter https://www.opengl.org/discussion_boards/showthread.php/162462-mipmaps-bilinear-filtering-in-a-vertex-shader http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter27.html http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter20.html

https://github.com/Yabause/yabause/issues/17 https://github.com/Yabause/yabause/issues/99 https://github.com/rdanbrook/yabause/commit/9e42bee055d79c09f113cccbf65ba5c7d6af1c8e https://github.com/cyberwarriorx/yabause/commit/0f8095b5a628d234e2979ddd816560f2d3d53d53 https://github.com/devmiyax/yabause/commit/c03e9033d2e124001e926da6a6fa8519987f3131 https://github.com/Yabause/yabause/commit/c6ffab78439de82e80cf1298b0747440c8f2a364 https://github.com/Yabause/yabause/commit/46bd80bd8f076f4e60cf86d18e8a5f259e962f07 https://github.com/Yabause/yabause/commit/f04d3c5fcdf038e70848e0bac6140911d977fab4 https://github.com/Yabause/yabause/commit/b307da5386fd73950f1acb5c5824fb8c89e49e00 https://github.com/Yabause/yabause/commit/261615bfc412099f0c617e200bb0e098cf8b36e1 https://github.com/Yabause/yabause/commit/9148de79a50e3929bd4e6e88f5287d8b77606c0f https://github.com/Yabause/yabause/commit/a8049ed790761bceed05ae7b08904848c72b4e88 https://github.com/Yabause/yabause/commit/f315ccaa0e1e0d590b056ccc6d70b6ca7f545008 https://github.com/Yabause/yabause/commit/e5504923ea24f61e25ba0cef053433fa5b08fd10 https://github.com/Yabause/yabause/commit/6288e2d1429556c72eab7ff87e896f6edf2eda75 https://github.com/Yabause/yabause/commit/3bd23ad318f5e6674301134535993b313a6d5945 https://github.com/Yabause/yabause/pull/22/files

ADormant commented 8 years ago

Xbrz is a good good filter for 2D and textures. https://github.com/Tinob/Ishiiruka/commit/d2fb92518f50c6154f33f05be39128e48d6b83be https://github.com/Tinob/Ishiiruka/commit/84f96aec7b2c52fda401e9d2419ab9a8787b349a http://sourceforge.net/projects/xbrz/files/?source=navbar https://github.com/hrydgard/ppsspp/tree/master/ext/xbrz https://github.com/devinacker/bsnes-plus/pull/27/files http://ngemu.com/threads/peops-opengl-1-78-xbrz-scalers-mod.173953/ http://ngemu.com/threads/peteopengl2tweak-tweaker-for-peteopengl2-plugin-w-gte-accuracy-hack.160319/ @Guillaumito @cyberwarriorx

paul-met commented 8 years ago

By the way, current bilinear filtering does not work on win 10 x64.

rdanbrook commented 8 years ago

@paul-met, that's possibly because the bilinear filter is only for the software renderer. There is currently no filtering done in the OpenGL high-level renderer, but maybe someone like me can add it eventually ;).

paul-met commented 8 years ago

But software rendering no longer works for me. Just black screen. I thought that it was abandoned.

rdanbrook commented 8 years ago

Software rendering does actually use OpenGL, but only to blit a software-rendered pixel array. You can use the OpenGL renderer though? That doesn't really add up, because if the OpenGL renderer works then you have OpenGL 3.x capabilities, which is what the software renderer now uses.

paul-met commented 8 years ago

It is clear now. If you put a Software interface by default, it works. But if during the game his switch to OpenGL, and back to Software, the black screen appears.

rdanbrook commented 8 years ago

Yes, I have noticed that as well but have not gotten familiar enough with the codebase to diagnose/fix it.

wingedonezero commented 8 years ago

I would really like to see external shaders or filtering added yabause is the best but the only thing its lacking is this.Which is common in most other emulators at the current time.With resolution increasing all the time this would make the emulator more future proof as well.