1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-29 19:40:35 +00:00

ray:: fixed hyperbolic fragdepth (but this should not work, some bug in GLSL?)

This commit is contained in:
Zeno Rogue 2022-03-27 19:43:01 +02:00
parent 049eb33105
commit 31f70bbbfa

View File

@ -1369,13 +1369,18 @@ void raygen::emit_iterate(int gid1) {
else fmain +=
" if(col.w == 1.) {\n";
if(hyperbolic && !eyes) fmain +=
" mediump vec4 t = at0 * sinh(go);\n";
else fmain +=
" mediump vec4 t = at0 * go;\n";
fmain +=
if(hyperbolic && !eyes && !intra::in) {
fmain +=
" mediump vec4 t = at0 * tanh(go);\n"
" t.w = 1.;\n";
fmain += "gl_FragColor.xyz *= 0.9999 + 0.0001 * t.z;\n";
fmain += "gl_FragColor.xyz /= 0.9999 + 0.0001 * t.z;\n";
}
else {
fmain +=
" mediump vec4 t = at0 * go;\n"
" t.w = 1.;\n";
}
if(levellines) {
if(hyperbolic && !eyes && !intra::in)