mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-22 18:32:42 +01:00
- [EMU] replace some tex coordinate tearing by replacing "fract(x / m) * m" by mod(x,m)
This commit is contained in:
parent
e54d675658
commit
6cfe1b5190
@ -917,12 +917,12 @@ GLint u_Projection3D;
|
||||
" float samplePSX(vec2 tc){\n"\
|
||||
" vec2 uv = (tc * vec2(0.25, 1.0) + v_page_clut.xy) * vec2(1.0 / 1024.0, 1.0 / 512.0);\n"\
|
||||
" vec2 comp = VRAM(uv);\n"\
|
||||
" int index = int(fract(tc.x / 4.0) * 4.0);\n"\
|
||||
" int index = int(mod(tc.x, 4.0));\n"\
|
||||
" float v = comp[index / 2] * (255.0 / 16.0);\n"\
|
||||
" float f = floor(v);\n"\
|
||||
" vec2 c = vec2( (v - f) * 16.0, f );\n"\
|
||||
" vec2 clut_pos = v_page_clut.zw;\n"\
|
||||
" clut_pos.x += mix(c[0], c[1], fract(float(index) / 2.0) * 2.0) / 1024.0;\n"\
|
||||
" clut_pos.x += mix(c[0], c[1], mod(index, 2)) / 1024.0;\n"\
|
||||
" return packRG(VRAM(clut_pos));\n"\
|
||||
" }\n"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user