From 1f2e9917f122d6589fed427e8b23fae07438ce16 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Thu, 14 Dec 2023 23:47:00 -0600 Subject: [PATCH] [nostalgia/core/opengl] Cleanup fragment shader --- src/nostalgia/modules/core/src/opengl/gfx.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/nostalgia/modules/core/src/opengl/gfx.cpp b/src/nostalgia/modules/core/src/opengl/gfx.cpp index d6830238..72cd809e 100644 --- a/src/nostalgia/modules/core/src/opengl/gfx.cpp +++ b/src/nostalgia/modules/core/src/opengl/gfx.cpp @@ -54,14 +54,8 @@ constexpr ox::StringView bgfshadTmpl = R"glsl( uniform sampler2D image; uniform vec2 fSrcImgSz; uniform vec4 fPalette[256]; - vec2 pixelSz; - vec4 getColor(vec2 offset) { - vec2 p = fTexCoord + pixelSz * offset; - int idx = int(texture(image, p).rgb.r * 256); - return fPalette[idx]; - } void main() { - pixelSz = vec2(1, 1) / (fSrcImgSz); + vec2 pixelSz = vec2(1, 1) / (fSrcImgSz); vec2 pixelCoord = floor(fTexCoord / pixelSz) * pixelSz; outColor = fPalette[int(texture(image, fTexCoord).rgb.r * 256)]; //outColor = vec4(0.0, 0.7, 1.0, 1.0);