mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 17:10:36 +00:00
hyperbolic raycast: fix the matrices
This commit is contained in:
parent
91338d047e
commit
98b1e659a5
@ -812,12 +812,10 @@ void enable_raycaster() {
|
||||
else fmain +=
|
||||
"position = position + tangent * dist;\n";
|
||||
|
||||
#if CAP_FIX_RAYCAST
|
||||
if(hyperbolic) fmain +=
|
||||
"position /= sqrt(position.w*position.w - dot(position.xyz, position.xyz));\n"
|
||||
"tangent -= dot(vec4(-position.xyz, position.w), tangent) * position;\n"
|
||||
"tangent /= sqrt(dot(tangent.xyz, tangent.xyz) - tangent.w*tangent.w);\n";
|
||||
#endif
|
||||
|
||||
if(hyperbolic && bt::in()) {
|
||||
fmain +=
|
||||
|
Loading…
Reference in New Issue
Block a user