Commit graph

13 commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks
3f3cbb8939 gs-mipmapper: Add mip level and remove bilinear from effect 2018-09-28 14:25:04 +02:00
Michael Fabian 'Xaymar' Dirks
e0f1de8c4b gs-mipmapper: Fix mipgen effect file 2018-09-28 11:48:06 +02:00
Michael Fabian 'Xaymar' Dirks
ded5896fca gs-texture: Add get_color_format method 2018-09-27 05:11:37 +02:00
Michael Fabian 'Xaymar' Dirks
af71a7cc1d filter-blur: Allow applying Blur to a sub-region of the source only
The Blur Filter can now be applied to a region inside the source itself, the inverse of that region, and/or a feathered version of that region. This allows for easier scene setups where only some parts need to be blurred, but the rest can be left as is.

Fixes #12
2018-04-29 00:14:29 +02:00
Michael Fabian 'Xaymar' Dirks
1ba9145fbd filter-blur: Use only a single Gaussian Kernel Texture 2018-04-28 14:41:18 +02:00
Xaymar
2f55841f88 effect: Code update, clean up and optimization 2017-10-22 19:05:29 +02:00
Michael Fabian Dirks
88cc142afb gs, effects: Anisotropic Mipmapper Class
End goal of this is to be an anisotropic filtering purely on the GPU without any actual mipmaps in the graphics subsystem. The basic idea behind it is that we can create all possible mipmaps in a twice as big texture as the original and then can efficiently render it no matter the GPU features as it will only consume one sampler.

The texture that it outputs will have both horizontal, vertical and full mipmaps in it. Horizontal mipmaps reduce Width, Vertical mipmaps reduce Height and full mipmaps reduce both. This means that LoD levels are both possible in the X and Y direction, allowing for much greater precision mipmapping on all GPUs.

This is a temporary solution until we can directly copy updated textures to a mipmap level.
2017-09-18 00:05:54 +02:00
Michael Fabian Dirks
6cc1be1b0d effect: Minor formatting changes 2017-08-20 00:25:20 +02:00
Michael Fabian Dirks
4dbf414214 effects, filter-blur: Precalculated Kernel, Formatting, Rendering and more
Filter:
* Massively improved Rendering loop to reduce overhead and provide cleaner code.

Gaussian Blur:
* Added precalculated Kernels using Textures. Slightly reduced GPU load.
* Added basic attempt at a Nvidia o(n/2+1) gaussian blur implementation.
* Fix up LOD for texture sampling.

Box Blur:
* Halved loop count.
2017-08-20 00:25:05 +02:00
Michael Fabian Dirks
0570904c5b effects: Reduce loop count with Gaussian Blur 2017-07-18 16:47:04 +02:00
Michael Fabian Dirks
58deaa9408 filter-displacement: Move effects to 'data/effects' 2017-07-06 06:23:06 +02:00
Michael Fabian Dirks
dceb2e533d effects: Add RGB -> YUV, YUV -> RGB color converter
This should help for filters requiring other color formats.
2017-07-06 06:01:37 +02:00
Michael Fabian Dirks
191b1ea23f filter-blur: Move effects to 'data/effects'
This should help reusing the same effect instead of having an effect per filter.
2017-07-06 05:52:46 +02:00