Hello, I am making a coremod that renders the game in two separate viewports that are slightly different to be used for cross-eyed 3d viewing. Basically it looks like this:
I am currently using MCP reborn (MCP for 1.15.2) instead of forge right now due to ease of use, but I plan to make this a coremod later and I don't know where I can get better help for modding right now than this site.
Currently, I have achieved this by modifying
net.minecraft.client.renderer.WorldRenderer.func_228426_a_(WorldRenderer.java:841)
[14:51:27] [Render thread/INFO]: [STDERR]: at net.minecraft.client.renderer.GameRenderer.renderWorld(GameRenderer.java:593)
[14:51:27] [Render thread/INFO]: [STDERR]: at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:420)
[14:51:27] [Render thread/INFO]: [STDERR]: at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:909)
[14:51:27] [Render thread/INFO]: [STDERR]: at net.minecraft.client.Minecraft.run(Minecraft.java:544)
[14:51:27] [Render thread/INFO]: [STDERR]: at net.minecraft.client.main.Main.main(Main.java:177)
I then run most of the code inside of this method twice, excluding the code that clear the screen, but I run RenderSystem.viewport() each time to change the position and scaling of each image. However, using this method only scales the viewport, and it results in each image being squished and looking terrible. It looks like this:
How can I get minecraft to actually render the world at half the width instead of simply scaling down the image? Where do the world render methods actually look for the resolution to render at?
Any help would be appreciated. Thanks.