fuckingtech/public/assets/glsl/lygia/sample/nearest.glsl
Elias Rhouzlane bf76c6b086 fix: code
2025-04-06 17:23:52 +02:00

22 lines
No EOL
722 B
GLSL

#include "../space/nearest.glsl"
#include "../sampler.glsl"
/*
contributors: Patricio Gonzalez Vivo
description: fakes a nearest sample
use: <vec4> sampleNearest(<SAMPLER_TYPE> tex, <vec2> st, <vec2> texResolution);
options:
- SAMPLER_FNC(TEX, UV)
examples:
- /shaders/sample_filter_nearest.frag
license:
- Copyright (c) 2021 Patricio Gonzalez Vivo under Prosperity License - https://prosperitylicense.com/versions/3.0.0
- Copyright (c) 2021 Patricio Gonzalez Vivo under Patron License - https://lygia.xyz/license
*/
#ifndef FNC_SAMPLENEAREST
#define FNC_SAMPLENEAREST
vec4 sampleNearest(SAMPLER_TYPE tex, vec2 st, vec2 texResolution) {
return SAMPLER_FNC( tex, nearest(st, texResolution) );
}
#endif