mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-25 01:20:37 +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 +=
|
else fmain +=
|
||||||
"position = position + tangent * dist;\n";
|
"position = position + tangent * dist;\n";
|
||||||
|
|
||||||
#if CAP_FIX_RAYCAST
|
|
||||||
if(hyperbolic) fmain +=
|
if(hyperbolic) fmain +=
|
||||||
"position /= sqrt(position.w*position.w - dot(position.xyz, position.xyz));\n"
|
"position /= sqrt(position.w*position.w - dot(position.xyz, position.xyz));\n"
|
||||||
"tangent -= dot(vec4(-position.xyz, position.w), tangent) * position;\n"
|
"tangent -= dot(vec4(-position.xyz, position.w), tangent) * position;\n"
|
||||||
"tangent /= sqrt(dot(tangent.xyz, tangent.xyz) - tangent.w*tangent.w);\n";
|
"tangent /= sqrt(dot(tangent.xyz, tangent.xyz) - tangent.w*tangent.w);\n";
|
||||||
#endif
|
|
||||||
|
|
||||||
if(hyperbolic && bt::in()) {
|
if(hyperbolic && bt::in()) {
|
||||||
fmain +=
|
fmain +=
|
||||||
|
Loading…
Reference in New Issue
Block a user