1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 14:37:16 +00:00

ray:: fixing the vectors (commented off)

This commit is contained in:
Zeno Rogue 2019-11-08 14:59:44 +01:00
parent effe35dd34
commit 97d4e45996

View File

@ -535,6 +535,13 @@ 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 && binarytiling) {
fmain +=