mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 04:55:44 +00:00
26 lines
850 B
GLSL
26 lines
850 B
GLSL
#version 450
|
|
#extension GL_GOOGLE_include_directive : require
|
|
|
|
layout(location = 0) in vec2 fragTexCoord;
|
|
layout(location = 0) out vec4 outColor;
|
|
layout(set = 0, binding = 0) uniform sampler2D EdgeTexture;
|
|
layout(set = 1, binding = 0) uniform sampler2D AreaTexture;
|
|
layout(set = 2, binding = 0) uniform sampler2D SearchTexture;
|
|
layout(push_constant) uniform Constants {
|
|
vec4 ndc;
|
|
vec4 metrics; // 1/width, 1/height, width, height
|
|
} pc;
|
|
|
|
#define SMAA_RT_METRICS pc.metrics
|
|
#define SMAA_GLSL_4
|
|
#define SMAA_PRESET_HIGH
|
|
#include "SMAA.hlsl"
|
|
|
|
void main() {
|
|
vec2 pixcoord;
|
|
vec4 offset[3];
|
|
SMAABlendingWeightCalculationVS(fragTexCoord, pixcoord, offset);
|
|
outColor = SMAABlendingWeightCalculationPS(fragTexCoord, pixcoord, offset, EdgeTexture,
|
|
AreaTexture, SearchTexture, vec4(0.0));
|
|
}
|