hand shader now uses modifier on texture warp

This commit is contained in:
Valerie Wolfe 2024-04-11 22:02:36 -04:00
parent 9c0ad3bee5
commit d6000bdbdd
2 changed files with 7 additions and 31 deletions

View file

@ -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"

View file

@ -2,6 +2,10 @@
//#define tWarp // psx texture warp
void texture_warp() {
#ifdef tWarp_mod
gl_Position /= abs(gl_Position.w + tWarp_mod);
#else
gl_Position /= abs(gl_Position.w);
#endif
}