Is there a projection matrix for the equirectangular projection

so i was doing some stuff (modding minecraft rd-132211) and i decided i wanted to use a projection matrix for equirectangular projection. only problem is my f(x,y,z) function is
$$P_x = atan({y\over x})\\P_y = atan({z\over \sqrt{x^2+y^2}})$$
but a projection matrix would have to be
$$\begin{bmatrix} a & b & c \\ d & e & f \\ 0 & 0 & 0 \end{bmatrix}$$
where
$$P_x = ax+by+cz\\P_y = dx+ey+fz$$

i'm fine with an approximation, as long as it approximates the intended result well enough

a projection matrix can't do an equirectangular projection, a projection matrix can only do linear transformations. the equirectangular projection projects a sphere to a plane, which isn't a linear transformation.

transformation matrixes keep straight lines and generally only work within euclidean space.
the equirectangular projection projects a sphere to a plane.

welp i guess i'm doing the projection on each point without being able to rely on org.lwjgl.util.glu.GLU

you can't do a 3d space transformation for an equirectangular projection either. the gpu draws flat triangles. if you try to transform the space directly, objects will render in the wrong order, lines will be jagged, etc.

the equirectangular projection is a 2d projection. it projects from the surface of a sphere (any direction you can look) to a plane (your monitor). if you want a proper equirectangular projection, you either need to raytrace from scratch, or render it like normal and transform it in screenspace.

from my understanding this is for a minecraft mod? either way there's already a mod that does exactly what you want (just not in great condition).

the devs of this have a few videos and related mods scattered around. the most well documented is blinky quake, but for minecraft there's a few different versions of render360 and flex-fov scattered around.

yes i know and that's a compromise i'm willing to take to avoid performance issues (i take the exact same compromise in Equirectangular-projected 3d)

though certainly not for rd-132211. i'll check it out anyway

after about 60 to 80 attempts, i managed to finagle the equirectangular shader in that to something whatever glsl mod is in b1.7.4 (a b1.7.3 modpack) will work with. now all i need to do is figure out if said glsl mod supports cubemap-based shaders, and if so, what uniforms to use for it

Off-topic-How do you mod rubydung? Tell me please that’s what I’ve always been wanting to do

first get the jar (there are four found--rd-132011 (launcher calls it rd-132211), rd-132128 (launcher calls it rd-132328), rd-152252 (launcher calls it rd-160052), and rd-161148 (launcher calls it rd-161348 and rd-20090515); i recommend getting them from Omniarchive), then decompile it with, e.g., Vineflower, then you can edit the decompiled sources to your liking

alternatively, for modding old minecraft in general, you can use RetroMCP-Java

What about lwjgl? How do I do it?

do what? have your mod use lwjgl? mod lwjgl?

Rubydung uses lwjgl

And how do I edit the files? Once they are decompiled and how do I turn back into jar so many questions? And how do I run the jar?

yes but what do you mean by "What about lwjgl? How do I do it?"

with a text editor or java ide (i use Eclipse but there's also IntelliJ IDEA and others)

using first the javac command in your java jdk to compile the .java files into .class files, then the jar command to package the class files into a jar. however, it's a lot easier if you use an ide

using the java command, with some long arguments, or just use an ide, as that's easier

I meant like using lwjgl to create things like a circular block or others or something

And when your nodding originák mc Java dont you have like a API that does everything for you? Like block pos or something

i wouldn't know

you're thinking of forge, fabric, quilt, risugami's modloader, etc., which are modloaders. minecraft, and especially early minecraft, like the preclassics (what you're reasonably calling rubydung), don't have apis--you have to manually edit each file in minecraft's code

But how do I compile the mod without lwjgl cuz ruby dung uses lwjgl

first, are you using an ide or just a text editor?

Im using a text editor cuz I have very litttle space on my computer

Im using notepad++