mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-23 16:50:27 +00:00
ray:: nicer bt_to_minkowski
This commit is contained in:
parent
d2c8527213
commit
4f3988602c
@ -1472,12 +1472,10 @@ void raygen::add_functions() {
|
|||||||
" float co = " + glhr::to_glsl(vid.binary_width / log(2) / 4) + ";\n"
|
" float co = " + glhr::to_glsl(vid.binary_width / log(2) / 4) + ";\n"
|
||||||
" h.x *= co; h.y *= co;\n"
|
" h.x *= co; h.y *= co;\n"
|
||||||
" float diag = (h.x*h.x + h.y*h.y)/2.;\n"
|
" float diag = (h.x*h.x + h.y*h.y)/2.;\n"
|
||||||
" float px = sinh(h.z);\n"
|
" res.x = sinh(h.z) + diag * exp(-h.z);\n"
|
||||||
" float pw = cosh(h.z);\n"
|
" res.y = h.x * exp(-h.z);\n"
|
||||||
" res.x = (1.-diag) * px + diag * pw;\n"
|
" res.z = h.y * exp(-h.z);\n"
|
||||||
" res.y = (-h.x) * px + h.x * pw;\n"
|
" res.w = cosh(h.z) + diag * exp(-h.z);\n"
|
||||||
" res.z = (-h.y) * px + h.y * pw;\n"
|
|
||||||
" res.w = (-diag) * px + (1.+diag) * pw;\n"
|
|
||||||
" return res;\n"
|
" return res;\n"
|
||||||
" }\n\n");
|
" }\n\n");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user