mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-19 16:20:01 -04:00
In-game mods (GameBanana browser, search and installs, with the Mask Salesman), code-patch and cheat mods, the devs' test18 to test45 work (full performance overlay, frame pacing on, steady frame rate, save export and import, bug capture, new options rows, Setup's Mods page and Add to Steam), occlusion queries and new defaults, Auto resolution that scales, replay helper threads and robust buffers off by default, the options in sections.
19 lines
1.0 KiB
Plaintext
19 lines
1.0 KiB
Plaintext
#version 450
|
|
// (Triforce) SMAA pass 0 (gpu/vk/vk_aa.cpp, the Anti-aliasing row's SMAA Ultra): the luma SMAA looks for edges in, from the
|
|
// tone mapped picture, in the square-root space the target stores (aa_common.glsl). One channel: SMAA's luma edge detection
|
|
// takes the dot product of the colour it reads with its luma weights, and a one-channel image reads as (r, 0, 0), so r holds
|
|
// the luma over the red weight. After NX2navi's shaders/smaa_encode.comp.
|
|
#extension GL_GOOGLE_include_directive : require
|
|
layout(local_size_x = 8, local_size_y = 8) in;
|
|
layout(binding = 0) uniform sampler2D src;
|
|
layout(binding = 1, r16f) uniform writeonly image2D dst;
|
|
layout(push_constant) uniform Push { vec4 metrics; } pc;
|
|
#include "aa_common.glsl"
|
|
|
|
void main() {
|
|
ivec2 p = ivec2(gl_GlobalInvocationID.xy);
|
|
if (p.x >= int(pc.metrics.z) || p.y >= int(pc.metrics.w)) return;
|
|
const vec3 W = vec3(0.2126, 0.7152, 0.0722); // (SMAA.hlsl SMAALumaEdgeDetectionPS's weights)
|
|
imageStore(dst, p, vec4(dot(aa_encode(texelFetch(src, p, 0).rgb), W) / W.r, 0.0, 0.0, 1.0));
|
|
}
|