From 8040b1a6357515eb8c09c5665439763650345618 Mon Sep 17 00:00:00 2001 From: Valerie Date: Thu, 11 Apr 2024 15:44:45 -0400 Subject: [PATCH] added held item exclusion option for texture warping --- shaders/gbuffers_hand.fsh | 4 ++++ shaders/gbuffers_hand.vsh | 33 +++++++++++++++++++++++++++++++++ shaders/shaders.properties | 6 ++++-- 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 shaders/gbuffers_hand.fsh create mode 100644 shaders/gbuffers_hand.vsh diff --git a/shaders/gbuffers_hand.fsh b/shaders/gbuffers_hand.fsh new file mode 100644 index 0000000..5c240ef --- /dev/null +++ b/shaders/gbuffers_hand.fsh @@ -0,0 +1,4 @@ +#version 120 + +#include "/module/empty.frag" + diff --git a/shaders/gbuffers_hand.vsh b/shaders/gbuffers_hand.vsh new file mode 100644 index 0000000..cb18926 --- /dev/null +++ b/shaders/gbuffers_hand.vsh @@ -0,0 +1,33 @@ +#version 120 + +#define pixelSize 2 // [1 2 4 8 16] +#define itemFix + +in int itemId; + +varying vec2 texcoord; +varying vec4 color; +varying vec2 lmcoord; + +uniform mat4 gbufferModelView, gbufferModelViewInverse; +uniform float viewWidth, viewHeight; + +#include "/module/vertex_warp.vert" +#include "/module/texture_warp.vert" + +void main() { + texcoord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy; + lmcoord = (gl_TextureMatrix[1] * gl_MultiTexCoord1).xy; + color = gl_Color; + + #if vWarp > 0 + vertex_warp(); + #else + gl_Position = ftransform(); + #endif + + if(itemId == 0) { + texture_warp(); + } +} + diff --git a/shaders/shaders.properties b/shaders/shaders.properties index 8708c55..42567d4 100644 --- a/shaders/shaders.properties +++ b/shaders/shaders.properties @@ -1,11 +1,13 @@ sliders=pixelSize hueSteps satSteps valSteps rgbSteps vWarp profile.DEFAULT=pixelSize=2 colorMode=0 dithering hueSteps=4 satSteps=4 valSteps=4 vWarp=0 !tWarp -profile.PSX=pixelsize=2 colorMode=1 !dithering rgbSteps=16 vWarp=2 tWarp +profile.PSX=pixelsize=2 colorMode=1 !dithering rgbSteps=16 vWarp=2 tWarp itemFix profile.DOS=pixelSize=4 colorMode=1 dithering rgbSteps=2 vWarp=0 !tWarp screen= pixelSize [COLOR] [PSX] screen.COLOR=colorMode dithering rgbSteps hueSteps satSteps valSteps -screen.PSX=vWarp tWarp +screen.PSX=vWarp tWarp itemFix + +gbuffers_hand.enabled=tWarp && itemFix