Compare commits
5 commits
6339df4ed5
...
e20e313001
Author | SHA1 | Date | |
---|---|---|---|
e20e313001 | |||
2289e55754 | |||
b88eafca56 | |||
2f41f19daf | |||
8040b1a635 |
5 changed files with 46 additions and 4 deletions
4
shaders/gbuffers_hand.fsh
Normal file
4
shaders/gbuffers_hand.fsh
Normal file
|
@ -0,0 +1,4 @@
|
|||
#version 120
|
||||
|
||||
#include "/module/empty.frag"
|
||||
|
33
shaders/gbuffers_hand.vsh
Normal file
33
shaders/gbuffers_hand.vsh
Normal file
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
@ -28,4 +28,7 @@ value.vWarp.16=Extreme (16x)
|
|||
value.vWarp.32=Silly (32x)
|
||||
option.tWarp=Texture Warping
|
||||
option.tWarp.comment=Emulates affine texture mapping responsible for warping textures on the PSX
|
||||
option.itemFix=Held Item Fix
|
||||
option.itemFix.comment=Exclude held item from texture warping
|
||||
|
||||
|
||||
|
|
|
@ -7,6 +7,6 @@ vec4 vertex_warp() {
|
|||
vec4 position = gbufferModelViewInverse * gl_ModelViewMatrix * gl_Vertex;
|
||||
vec2 nearest = round(position.xy / position.w * screen) / screen;
|
||||
position.xy = nearest;
|
||||
return (gl_ProjectionMatrix * gbufferModelView * position);
|
||||
gl_Position = gl_ProjectionMatrix * gbufferModelView * position;
|
||||
}
|
||||
|
||||
|
|
|
@ -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.DOS=pixelSize=4 colorMode=1 dithering rgbSteps=2 vWarp=0 !tWarp
|
||||
profile.PSX=pixelsize=2 colorMode=1 !dithering rgbSteps=16 vWarp=2 tWarp itemFix
|
||||
profile.DOS=pixelSize=4 colorMode=1 dithering rgbSteps=2 vWarp=1 !tWarp
|
||||
|
||||
screen=<profile> <empty> pixelSize <empty> [COLOR] [PSX]
|
||||
|
||||
screen.COLOR=colorMode dithering rgbSteps <empty> hueSteps satSteps valSteps
|
||||
screen.PSX=vWarp tWarp
|
||||
screen.PSX=vWarp tWarp <empty> itemFix
|
||||
|
||||
gbuffers_hand.enabled=tWarp && itemFix
|
||||
|
||||
|
|
Loading…
Reference in a new issue