hand shader now uses modifier on texture warp
This commit is contained in:
parent
7b57e91a08
commit
5b4bbac28a
2 changed files with 7 additions and 31 deletions
|
@ -1,33 +1,5 @@
|
||||||
#version 120
|
|
||||||
|
|
||||||
#define pixelSize 2 // [1 2 4 8 16]
|
#define tWarp_mod 1.5
|
||||||
#define itemFix
|
|
||||||
|
|
||||||
in int itemId;
|
#include "/gbuffers_basic.vsh"
|
||||||
|
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
//#define tWarp // psx texture warp
|
//#define tWarp // psx texture warp
|
||||||
|
|
||||||
void 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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue