Skip to content

Instantly share code, notes, and snippets.

@emmauss
emmauss / gist:cf447a25060d079138cd8901f9a92156
Created September 2, 2022 09:56
smaa neigbour ryujinx
#version 430 core
#define SMAA_GLSL_4 1
layout (constant_id = 0) const int SMAA_PRESET_LOW = 0;
layout (constant_id = 1) const int SMAA_PRESET_MEDIUM = 0;
layout (constant_id = 2) const int SMAA_PRESET_HIGH = 0;
layout (constant_id = 3) const int SMAA_PRESET_ULTRA = 0;
layout (constant_id = 4) const float METRIC_WIDTH = 1920.0;
layout (constant_id = 5) const float METRIC_HEIGHT = 1080.0;
#version 430 core
#define SMAA_GLSL_4 1
layout (constant_id = 0) const int SMAA_PRESET_LOW = 0;
layout (constant_id = 1) const int SMAA_PRESET_MEDIUM = 0;
layout (constant_id = 2) const int SMAA_PRESET_HIGH = 0;
layout (constant_id = 3) const int SMAA_PRESET_ULTRA = 0;
layout (constant_id = 4) const float METRIC_WIDTH = 1920.0;
layout (constant_id = 5) const float METRIC_HEIGHT = 1080.0;
#version 430 core
#define SMAA_GLSL_4 1
layout (constant_id = 0) const int SMAA_PRESET_LOW = 0;
layout (constant_id = 1) const int SMAA_PRESET_MEDIUM = 0;
layout (constant_id = 2) const int SMAA_PRESET_HIGH = 0;
layout (constant_id = 3) const int SMAA_PRESET_ULTRA = 0;
layout (constant_id = 4) const float METRIC_WIDTH = 1920.0;
layout (constant_id = 5) const float METRIC_HEIGHT = 1080.0;
// https://www.shadertoy.com/view/ls3GWS
#version 430 core
precision mediump float;
layout (local_size_x = 16, local_size_y = 16) in;
layout(rgba8, binding = 0, set = 3) uniform image2D imgOutput;
layout(binding = 1, set = 2) uniform sampler2D inputImage;
layout( binding = 2 ) uniform invResolution
{
@emmauss
emmauss / gist:4cc2535e6e4ec45c10cf748dddfb7957
Last active August 30, 2022 08:46
fsr ryujinx sharpening
// Sharpening
#version 430 core
precision mediump float;
layout (local_size_x = 64) in;
layout( rgba8, binding = 0, set = 3) uniform image2D imgOutput;
layout( binding = 2 ) uniform invResolution
{
vec2 invResolution_data;
};
layout( binding = 3 ) uniform outvResolution
@emmauss
emmauss / gist:79f339dc0bfbde5d43f01ab4ebf15d41
Last active August 29, 2022 14:23
fsr scaling ryujinx
// Scaling
#version 430 core
precision mediump float;
layout (local_size_x = 64) in;
layout( rgba8, binding = 0, set = 3) uniform image2D imgOutput;
layout( binding = 1, set = 2) uniform sampler2D Source;
layout( binding = 2 ) uniform dimensions{
float srcX0;
float srcX1;
@emmauss
emmauss / GLWidget.cs
Last active February 6, 2020 09:37
GLWidget for OpenTk
//https://github.com/Nihlus/GLWidgetTest/blob/master/GLWidget/GLWidgetGTK3/GLWidget.cs
#region License
//
// The Open Toolkit Library License
//
// Copyright (c) 2006 - 2009 the Open Toolkit library, except where noted.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights to