From 5b4bbac28a3e1e8406e336586fc46bb756bffdc1 Mon Sep 17 00:00:00 2001 From: Valerie Date: Thu, 11 Apr 2024 22:02:36 -0400 Subject: [PATCH] hand shader now uses modifier on texture warp --- shaders/gbuffers_hand.vsh | 32 ++------------------------------ shaders/module/texture_warp.vert | 6 +++++- 2 files changed, 7 insertions(+), 31 deletions(-) diff --git a/shaders/gbuffers_hand.vsh b/shaders/gbuffers_hand.vsh index cb18926..1ff3ee5 100644 --- a/shaders/gbuffers_hand.vsh +++ b/shaders/gbuffers_hand.vsh @@ -1,33 +1,5 @@ -#version 120 -#define pixelSize 2 // [1 2 4 8 16] -#define itemFix +#define tWarp_mod 1.5 -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(); - } -} +#include "/gbuffers_basic.vsh" diff --git a/shaders/module/texture_warp.vert b/shaders/module/texture_warp.vert index c5e1a8d..a61f52f 100644 --- a/shaders/module/texture_warp.vert +++ b/shaders/module/texture_warp.vert @@ -2,6 +2,10 @@ //#define tWarp // psx texture warp void texture_warp() { - gl_Position /= abs(gl_Position.w); + #ifdef tWarp_mod + gl_Position /= abs(gl_Position.w + tWarp_mod); + #else + gl_Position /= abs(gl_Position.w); + #endif }