Skip to content

Instantly share code, notes, and snippets.

@Xynonners
Xynonners / AHAA.gdshader
Last active April 25, 2024 12:15
new godot antialiasing (Absurd Hybrid Anti-Aliasing)
shader_type spatial;
render_mode unshaded, depth_prepass_alpha;
void vertex() {
POSITION = vec4(VERTEX, 1.0);
}
uniform sampler2D BackBufferTex : hint_screen_texture, repeat_disable, filter_nearest;
uniform sampler2D DepthBufferTex : hint_depth_texture, repeat_disable, filter_nearest;
@Xynonners
Xynonners / HHAA-D.gdshader
Last active April 25, 2024 12:16
gdshader HHAA implementation (spatial/depth AA)
shader_type spatial;
render_mode unshaded;
void vertex() {
POSITION = vec4(VERTEX, 1.0);
}
uniform sampler2D BackBufferTex : hint_screen_texture, repeat_disable, filter_nearest;
uniform sampler2D DepthBufferTex : source_color, hint_depth_texture, filter_nearest;
@Xynonners
Xynonners / LXAA.gdshader
Last active April 10, 2024 01:26
gdshader LXAA implementation, put in full rect ColorRect across entire screen
/* Fast antialiasing shader by G.Rebord (mod by Xynon for Godot)
Based on FXAA3 CONSOLE version by TIMOTHY LOTTES
------------------------------------------------------------------------------
THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
============================================================================*/