mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-12 10:20:32 +00:00
ray:: fixed raycaster for twist/nil to take nilwidth into account
This commit is contained in:
parent
1d9760e41c
commit
a31fe5e2c1
@ -1421,7 +1421,7 @@ void raygen::emit_iterate(int gid1) {
|
||||
"mediump float vx = asinh(dx / cosh(2.*vy)) / 2.;\n" :
|
||||
"mediump float vy = -asin(dy)/2.;\n"
|
||||
"mediump float vx = asin(dx / cos(2.*vy)) / 2.;\n";
|
||||
string calc_vz = nil ? "mediump float vz = h.z - h.x * h.y / 2.;\n" : "float vz = atan2(h1[2], h1[3]);\n";
|
||||
string calc_vz = nil ? "mediump float vz = h.z - h.x * h.y / 2.; vz *= " + to_glsl(pow(nilv::nilwidth, -2)) + ";\n" : "float vz = atan2(h1[2], h1[3]);\n";
|
||||
string calc_h1 = nil ? "" : sl2 ?
|
||||
"vec4 h1 = lorentz(1, 3, -vy) * lorentz(0, 2, -vy) * lorentz(0, 3, -vx) * lorentz(2, 1, vx) * h;\n" :
|
||||
"vec4 h1 = cspin(0, 3, vy) * cspin(1, 2, -vy) * cspin(1, 3, -vx) * cspin(0, 2, -vx) * h;\n";
|
||||
|
Loading…
Reference in New Issue
Block a user