Commit graph

12 commits

Author SHA1 Message Date
Venkat Rao 4f715b6718
Add nearest neighbor texture filter (#6189)
Closes https://github.com/citra-emu/citra/issues/4707
closes https://github.com/citra-emu/citra/issues/5274
2022-11-16 18:55:14 +01:00
emufan4568 12f84e18dc externals: Upgrade glad to latest version
* Also change some mentions to OpenGL 3.3 to 4.3
2022-08-22 23:44:03 +03:00
emufan4568 31e6b553dc video_core: Run clang format 2022-08-22 08:00:30 +03:00
emufan4568 17ad594a62 rasterizer_cache: Introduce TextureRuntime and separate CachedSurface
* This commit aims to both continue the rasterizer cache cleanup by
  separating CachedSurface into a dedicated header and to start weeding
  out the raw OpenGL code from the cache.

* The latter is achieved by abstracting most texture operations in a new
  class called TextureRuntime. This has many benefits such as making it easier
  to port the functionality to other graphics APIs and the removal of the need
  to pass (read/draw) framebuffer handles everywhere. The filterer and
  reinterpreter get their own sets of FBOs due to this, something that
  might be a performance win since it reduces the state switching
  overhead on the runtime FBOs.
2022-08-21 01:16:48 +03:00
emufan4568 6a7d601e42 rasterizer_cache: Factor morton swizzle and pixel format to dedicate headers
* Makes the code cleaner in general by not having to alias PixelFormat and SurfaceType everywhere
2022-08-21 01:16:47 +03:00
emufan4568 efc2db4088 rasterizer_cache: Separate into common directory 2022-08-21 01:16:42 +03:00
BreadFish64 91f52c2fdb video_core: fix texture filters in GLES
anime4k: reset state.texture_units[0].texture_2d before filtering

clang-fmt
2021-09-29 22:51:16 +05:30
Marshall Mohror 8a0b0c2fc7
texture_filters: update ScaleForce (#5270)
* texture_filters: update ScaleForce

* texture_filters: optimize scale_force

* texture_filters/scale_force: optimize final offset calculation
2020-04-27 23:50:47 -05:00
Marshall Mohror 55ecaa0344
video_core: add ScaleForce to texture filters (#5210)
* video_core: add ScaleForce to texture filters

* fix erroneous namespace end comment

Co-Authored-By: Valentin Vanelslande <vvanelslandedev@gmail.com>

* move copyright header to shader file

Co-authored-by: Valentin Vanelslande <vvanelslandedev@gmail.com>
2020-04-16 13:33:14 -05:00
Marshall Mohror f14e973a27
Texture Filtering v2 (#5166)
* video_core/renderer_opengl: Move SurfaceParams into its own file

Some of its enums are needed outside of the rasterizer cache
and trying to use it caused circular dependencies.

* video_core/renderer_opengl: Overhaul the texture filter framework

This should make it less intrusive.
Now texture filtering doesn't have any mutable global state.
The texture filters now always upscale to the internal rendering resolution.
This simplifies the logic in UploadGLTexture and it simply takes the role of BlitTextures at the end of the function.
This also prevent extra blitting required when uploading to a framebuffer surface with a mismatched size.

* video_core/renderer_opengl: Use generated mipmaps for filtered textures

The filtered guest mipmaps often looked terrible.

* core/settings: Remove texture filter factor

* sdl/config: Remove texture filter factor

* qt/config: Remove texture filter factor
2020-04-02 22:42:50 -05:00
Jan Beich bb3decb983 video_core: don't use NULL for non-pointer after a7d3489dc9
src/video_core/renderer_opengl/texture_filters/bicubic/bicubic.cpp:51:86: error: cannot initialize a parameter of type 'GLuint' (aka 'unsigned int') with an rvalue of type 'nullptr_t'
    glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, NULL, 0);
                                                                                     ^~~~
src/video_core/renderer_opengl/texture_filters/xbrz/xbrz_freescale.cpp:95:86: error: cannot initialize a parameter of type 'GLuint' (aka 'unsigned int') with an rvalue of type 'nullptr_t'
    glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, NULL, 0);
                                                                                     ^~~~
/usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
 #define NULL    nullptr
                 ^~~~~~~
2020-03-19 00:10:43 +00:00
Marshall Mohror a7d3489dc9
video_core: add texture filtering (#5017)
video_core: add texture filtering
2020-03-16 09:42:05 -05:00