add Dh prefix to DH math objects
This commit is contained in:
+2
-2
@@ -4,7 +4,7 @@ package com.seibel.distanthorizons.common.commonMixins;
|
||||
import com.seibel.distanthorizons.common.wrappers.McObjectConverter;
|
||||
import com.seibel.distanthorizons.common.wrappers.modAccessor.AbstractImmersivePortalsAccessorCommon;
|
||||
import com.seibel.distanthorizons.core.pos.blockPos.DhBlockPos;
|
||||
import com.seibel.distanthorizons.core.util.math.Vec3d;
|
||||
import com.seibel.distanthorizons.core.util.math.DhVec3d;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
@@ -53,7 +53,7 @@ public class MixinImmersivePortalsRenderStatesCommon
|
||||
#else
|
||||
Vec3 cameraPos = mc.gameRenderer.getMainCamera().position();
|
||||
#endif
|
||||
AbstractImmersivePortalsAccessorCommon.actualCameraPos = new Vec3d(cameraPos.x(), cameraPos.y(), cameraPos.z());
|
||||
AbstractImmersivePortalsAccessorCommon.actualCameraPos = new DhVec3d(cameraPos.x(), cameraPos.y(), cameraPos.z());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+8
-8
@@ -41,9 +41,9 @@ import com.seibel.distanthorizons.core.logging.DhLogger;
|
||||
import com.seibel.distanthorizons.core.logging.DhLoggerBuilder;
|
||||
import com.seibel.distanthorizons.core.render.EDhRenderDepth;
|
||||
import com.seibel.distanthorizons.core.render.renderer.AbstractDebugWireframeRenderer;
|
||||
import com.seibel.distanthorizons.core.util.math.Mat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.Vec3d;
|
||||
import com.seibel.distanthorizons.core.util.math.Vec3f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhMat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhVec3d;
|
||||
import com.seibel.distanthorizons.core.util.math.DhVec3f;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftRenderWrapper;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.render.AbstractDhRenderApiDefinition;
|
||||
import org.lwjgl.system.MemoryUtil;
|
||||
@@ -98,7 +98,7 @@ public class BlazeDebugWireframeRenderer extends AbstractDebugWireframeRenderer
|
||||
//endregion
|
||||
};
|
||||
|
||||
private static final Mat4f TRANSFORM_MATRIX = new Mat4f();
|
||||
private static final DhMat4f TRANSFORM_MATRIX = new DhMat4f();
|
||||
|
||||
|
||||
|
||||
@@ -255,14 +255,14 @@ public class BlazeDebugWireframeRenderer extends AbstractDebugWireframeRenderer
|
||||
// uniforms
|
||||
{
|
||||
// create data //
|
||||
Vec3d camPos = MC_RENDER.getCameraExactPosition();
|
||||
Vec3f camPosFloatThisFrame = new Vec3f((float) camPos.x, (float) camPos.y, (float) camPos.z);
|
||||
DhVec3d camPos = MC_RENDER.getCameraExactPosition();
|
||||
DhVec3f camPosFloatThisFrame = new DhVec3f((float) camPos.x, (float) camPos.y, (float) camPos.z);
|
||||
|
||||
Mat4f boxTransform = Mat4f.createTranslateMatrix(
|
||||
DhMat4f boxTransform = DhMat4f.createTranslateMatrix(
|
||||
box.minPos.x - camPosFloatThisFrame.x,
|
||||
box.minPos.y - camPosFloatThisFrame.y,
|
||||
box.minPos.z - camPosFloatThisFrame.z);
|
||||
boxTransform.multiply(Mat4f.createScaleMatrix(
|
||||
boxTransform.multiply(DhMat4f.createScaleMatrix(
|
||||
box.maxPos.x - box.minPos.x,
|
||||
box.maxPos.y - box.minPos.y,
|
||||
box.maxPos.z - box.minPos.z));
|
||||
|
||||
+4
-4
@@ -60,8 +60,8 @@ import com.seibel.distanthorizons.core.wrapperInterfaces.render.AbstractDhRender
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.render.objects.IDhGenericObjectVertexBufferContainer;
|
||||
import com.seibel.distanthorizons.core.render.renderer.RenderableBoxGroup;
|
||||
import com.seibel.distanthorizons.core.util.LodUtil;
|
||||
import com.seibel.distanthorizons.core.util.math.Mat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.Vec3d;
|
||||
import com.seibel.distanthorizons.core.util.math.DhMat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhVec3d;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftRenderWrapper;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IProfilerWrapper;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.render.renderPass.IDhGenericRenderer;
|
||||
@@ -350,7 +350,7 @@ public class BlazeDhGenericObjectRenderer implements IDhGenericRenderer
|
||||
|
||||
ApiEventInjector.INSTANCE.fireAllEvents(DhApiBeforeGenericRenderSetupEvent.class, renderEventParam.apiCopy);
|
||||
|
||||
Vec3d camPos = MC_RENDER.getCameraExactPosition();
|
||||
DhVec3d camPos = MC_RENDER.getCameraExactPosition();
|
||||
|
||||
//#endregion
|
||||
|
||||
@@ -423,7 +423,7 @@ public class BlazeDhGenericObjectRenderer implements IDhGenericRenderer
|
||||
{
|
||||
// create data //
|
||||
|
||||
Mat4f projectionMvmMatrix = new Mat4f(renderEventParam.dhProjectionMatrix);
|
||||
DhMat4f projectionMvmMatrix = new DhMat4f(renderEventParam.dhProjectionMatrix);
|
||||
projectionMvmMatrix.multiply(renderEventParam.dhModelViewMatrix);
|
||||
|
||||
|
||||
|
||||
+6
-6
@@ -32,9 +32,9 @@ import com.seibel.distanthorizons.core.pos.DhSectionPos;
|
||||
import com.seibel.distanthorizons.core.render.EDhRenderDepth;
|
||||
import com.seibel.distanthorizons.core.render.RenderParams;
|
||||
import com.seibel.distanthorizons.core.util.RenderUtil;
|
||||
import com.seibel.distanthorizons.core.util.math.Mat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.Vec3d;
|
||||
import com.seibel.distanthorizons.core.util.math.Vec3f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhMat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhVec3d;
|
||||
import com.seibel.distanthorizons.core.util.math.DhVec3f;
|
||||
import com.seibel.distanthorizons.core.util.objects.SortedArraySet;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IProfilerWrapper;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.render.AbstractDhRenderApiDefinition;
|
||||
@@ -54,7 +54,7 @@ public class BlazeDhTerrainRenderer implements IDhTerrainRenderer
|
||||
|
||||
public static final BlazeDhTerrainRenderer INSTANCE = new BlazeDhTerrainRenderer();
|
||||
|
||||
private static final Vec3f MODEL_POS = new Vec3f();
|
||||
private static final DhVec3f MODEL_POS = new DhVec3f();
|
||||
/** single event object used to reduce GC pressure */
|
||||
private static final DhApiBeforeBufferRenderEvent.EventParam BEFORE_BUFFER_RENDER_EVENT_PARAM = new DhApiBeforeBufferRenderEvent.EventParam();
|
||||
|
||||
@@ -181,7 +181,7 @@ public class BlazeDhTerrainRenderer implements IDhTerrainRenderer
|
||||
|
||||
profiler.popPush("vert share uniforms");
|
||||
{
|
||||
Mat4f combinedMatrix = new Mat4f(renderEventParam.dhProjectionMatrix);
|
||||
DhMat4f combinedMatrix = new DhMat4f(renderEventParam.dhProjectionMatrix);
|
||||
combinedMatrix.multiply(renderEventParam.dhModelViewMatrix);
|
||||
|
||||
float earthCurveRatio = Config.Client.Advanced.Graphics.Experimental.earthCurveRatio.get();
|
||||
@@ -304,7 +304,7 @@ public class BlazeDhTerrainRenderer implements IDhTerrainRenderer
|
||||
|
||||
// fire render event
|
||||
{
|
||||
Vec3d camPos = renderEventParam.exactCameraPosition;
|
||||
DhVec3d camPos = renderEventParam.exactCameraPosition;
|
||||
MODEL_POS.set(
|
||||
(float) (bufferContainer.minCornerBlockPos.getX() - camPos.x),
|
||||
(float) (bufferContainer.minCornerBlockPos.getY() - camPos.y),
|
||||
|
||||
-1
@@ -44,7 +44,6 @@ import com.seibel.distanthorizons.core.logging.DhLoggerBuilder;
|
||||
import com.seibel.distanthorizons.core.render.EDhRenderDepth;
|
||||
import com.seibel.distanthorizons.core.render.RenderParams;
|
||||
import com.seibel.distanthorizons.core.util.RenderUtil;
|
||||
import com.seibel.distanthorizons.core.util.math.Mat4f;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.render.AbstractDhRenderApiDefinition;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.render.renderPass.IDhFarFadeRenderer;
|
||||
|
||||
|
||||
+2
-2
@@ -40,7 +40,7 @@ import com.seibel.distanthorizons.core.logging.DhLoggerBuilder;
|
||||
import com.seibel.distanthorizons.core.render.EDhRenderDepth;
|
||||
import com.seibel.distanthorizons.core.render.RenderParams;
|
||||
import com.seibel.distanthorizons.core.util.LodUtil;
|
||||
import com.seibel.distanthorizons.core.util.math.Mat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhMat4f;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftClientWrapper;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftRenderWrapper;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.render.AbstractDhRenderApiDefinition;
|
||||
@@ -180,7 +180,7 @@ public class BlazeDhFogRenderer implements IDhFogRenderer
|
||||
|
||||
int lodDrawDistance = Config.Client.Advanced.Graphics.Quality.lodChunkRenderDistanceRadius.get() * LodUtil.CHUNK_WIDTH;
|
||||
|
||||
Mat4f inverseMvmProjMatrix = new Mat4f(renderParams.dhMvmProjMatrix);
|
||||
DhMat4f inverseMvmProjMatrix = new DhMat4f(renderParams.dhMvmProjMatrix);
|
||||
inverseMvmProjMatrix.invert();
|
||||
|
||||
EDhApiHeightFogMixMode heightFogMixingMode = fogRenderParams.getHeightFogMixingMode();
|
||||
|
||||
+3
-3
@@ -37,7 +37,7 @@ import com.seibel.distanthorizons.core.logging.DhLoggerBuilder;
|
||||
import com.seibel.distanthorizons.core.render.EDhRenderDepth;
|
||||
import com.seibel.distanthorizons.core.render.RenderParams;
|
||||
import com.seibel.distanthorizons.core.util.RenderUtil;
|
||||
import com.seibel.distanthorizons.core.util.math.Mat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhMat4f;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftRenderWrapper;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.render.AbstractDhRenderApiDefinition;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.render.renderPass.IDhSsaoRenderer;
|
||||
@@ -173,8 +173,8 @@ public class BlazeDhSsaoRenderer implements IDhSsaoRenderer
|
||||
// frag uniforms
|
||||
{
|
||||
// create data //
|
||||
Mat4f projMatrix = new Mat4f(renderParams.dhProjectionMatrix);
|
||||
Mat4f invertedProjMatrix = new Mat4f(renderParams.dhProjectionMatrix);
|
||||
DhMat4f projMatrix = new DhMat4f(renderParams.dhProjectionMatrix);
|
||||
DhMat4f invertedProjMatrix = new DhMat4f(renderParams.dhProjectionMatrix);
|
||||
invertedProjMatrix.invert();
|
||||
|
||||
|
||||
|
||||
+5
-5
@@ -45,7 +45,7 @@ import com.seibel.distanthorizons.core.logging.DhLoggerBuilder;
|
||||
import com.seibel.distanthorizons.core.render.EDhRenderDepth;
|
||||
import com.seibel.distanthorizons.core.render.RenderParams;
|
||||
import com.seibel.distanthorizons.core.util.RenderUtil;
|
||||
import com.seibel.distanthorizons.core.util.math.Mat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhMat4f;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftRenderWrapper;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.render.AbstractDhRenderApiDefinition;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.render.renderPass.IDhVanillaFadeRenderer;
|
||||
@@ -174,16 +174,16 @@ public class BlazeVanillaFadeRenderer implements IDhVanillaFadeRenderer
|
||||
float fadeEndDistance = dhNearClipDistance * 1.9f;
|
||||
|
||||
|
||||
Mat4f inverseMcModelViewProjectionMatrix = new Mat4f(renderParams.mcProjectionMatrix);
|
||||
DhMat4f inverseMcModelViewProjectionMatrix = new DhMat4f(renderParams.mcProjectionMatrix);
|
||||
inverseMcModelViewProjectionMatrix.multiply(renderParams.mcModelViewMatrix);
|
||||
inverseMcModelViewProjectionMatrix.invert();
|
||||
Mat4f inverseMcMvmProjMatrix = inverseMcModelViewProjectionMatrix;
|
||||
DhMat4f inverseMcMvmProjMatrix = inverseMcModelViewProjectionMatrix;
|
||||
|
||||
|
||||
Mat4f inverseDhModelViewProjectionMatrix = new Mat4f(renderParams.dhProjectionMatrix);
|
||||
DhMat4f inverseDhModelViewProjectionMatrix = new DhMat4f(renderParams.dhProjectionMatrix);
|
||||
inverseDhModelViewProjectionMatrix.multiply(renderParams.dhModelViewMatrix);
|
||||
inverseDhModelViewProjectionMatrix.invert();
|
||||
Mat4f inverseDhMvmProjMatrix = inverseDhModelViewProjectionMatrix;
|
||||
DhMat4f inverseDhMvmProjMatrix = inverseDhModelViewProjectionMatrix;
|
||||
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@ public class BlazeLodUniformBufferWrapper {}
|
||||
#else
|
||||
|
||||
import com.seibel.distanthorizons.core.dataObjects.render.bufferBuilding.LodBufferContainer;
|
||||
import com.seibel.distanthorizons.core.util.math.Vec3f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhVec3f;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.render.objects.ILodContainerUniformBufferWrapper;
|
||||
|
||||
public class BlazeLodUniformBufferWrapper extends BlazeUniformBufferWrapper implements ILodContainerUniformBufferWrapper
|
||||
@@ -40,7 +40,7 @@ public class BlazeLodUniformBufferWrapper extends BlazeUniformBufferWrapper impl
|
||||
return;
|
||||
}
|
||||
|
||||
Vec3f modelOffset = new Vec3f(
|
||||
DhVec3f modelOffset = new DhVec3f(
|
||||
(float) (bufferContainer.minCornerBlockPos.getX()),
|
||||
(float) (bufferContainer.minCornerBlockPos.getY()),
|
||||
(float) (bufferContainer.minCornerBlockPos.getZ()));
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@ import com.seibel.distanthorizons.api.objects.math.DhApiMat4f;
|
||||
import com.seibel.distanthorizons.common.render.blaze.util.BlazeUniformUtil;
|
||||
import com.seibel.distanthorizons.core.logging.DhLogger;
|
||||
import com.seibel.distanthorizons.core.logging.DhLoggerBuilder;
|
||||
import com.seibel.distanthorizons.core.util.math.Mat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhMat4f;
|
||||
import org.lwjgl.system.MemoryUtil;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
@@ -95,7 +95,7 @@ public class BlazeUniformBufferWrapper implements AutoCloseable
|
||||
public BlazeUniformBufferWrapper putMat4f(DhApiMat4f matrix)
|
||||
{
|
||||
this.putElement(EUniformElement.MAT4f);
|
||||
this.uniformBufferBuilder.putMat4f(Mat4f.createJomlMatrix(matrix));
|
||||
this.uniformBufferBuilder.putMat4f(DhMat4f.createJomlMatrix(matrix));
|
||||
return this;
|
||||
}
|
||||
public BlazeUniformBufferWrapper putFloat(float f)
|
||||
|
||||
+4
-4
@@ -30,7 +30,7 @@ import com.seibel.distanthorizons.core.logging.DhLogger;
|
||||
import com.seibel.distanthorizons.core.logging.DhLoggerBuilder;
|
||||
import com.seibel.distanthorizons.core.render.RenderParams;
|
||||
import com.seibel.distanthorizons.core.render.renderer.AbstractDebugWireframeRenderer;
|
||||
import com.seibel.distanthorizons.core.util.math.Mat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhMat4f;
|
||||
import org.lwjgl.opengl.GL32;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
@@ -178,10 +178,10 @@ public class GlDhDebugWireframeRenderer extends AbstractDebugWireframeRenderer
|
||||
@Override
|
||||
public void renderBox(Box box)
|
||||
{
|
||||
Mat4f boxTransform = Mat4f.createTranslateMatrix(box.minPos.x - this.camPosFloatThisFrame.x, box.minPos.y - this.camPosFloatThisFrame.y, box.minPos.z - this.camPosFloatThisFrame.z);
|
||||
boxTransform.multiply(Mat4f.createScaleMatrix(box.maxPos.x - box.minPos.x, box.maxPos.y - box.minPos.y, box.maxPos.z - box.minPos.z));
|
||||
DhMat4f boxTransform = DhMat4f.createTranslateMatrix(box.minPos.x - this.camPosFloatThisFrame.x, box.minPos.y - this.camPosFloatThisFrame.y, box.minPos.z - this.camPosFloatThisFrame.z);
|
||||
boxTransform.multiply(DhMat4f.createScaleMatrix(box.maxPos.x - box.minPos.x, box.maxPos.y - box.minPos.y, box.maxPos.z - box.minPos.z));
|
||||
|
||||
Mat4f transformMatrix = this.dhMvmProjMatrixThisFrame.copy();
|
||||
DhMat4f transformMatrix = this.dhMvmProjMatrixThisFrame.copy();
|
||||
transformMatrix.multiply(boxTransform);
|
||||
this.basicShader.setUniform(this.basicShader.getUniformLocation("uTransform"), transformMatrix);
|
||||
|
||||
|
||||
+4
-4
@@ -45,7 +45,7 @@ import com.seibel.distanthorizons.core.render.renderer.RenderableBoxGroup;
|
||||
import com.seibel.distanthorizons.core.util.LodUtil;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftRenderWrapper;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IProfilerWrapper;
|
||||
import com.seibel.distanthorizons.core.util.math.Vec3d;
|
||||
import com.seibel.distanthorizons.core.util.math.DhVec3d;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.render.renderPass.IDhGenericRenderer;
|
||||
import com.seibel.distanthorizons.coreapi.DependencyInjection.ApiEventInjector;
|
||||
import com.seibel.distanthorizons.coreapi.DependencyInjection.OverrideInjector;
|
||||
@@ -450,7 +450,7 @@ public class GlGenericObjectRenderer implements IDhGenericRenderer
|
||||
|
||||
this.boxIndexBuffer.bind();
|
||||
|
||||
Vec3d camPos = MC_RENDER.getCameraExactPosition();
|
||||
DhVec3d camPos = MC_RENDER.getCameraExactPosition();
|
||||
|
||||
|
||||
|
||||
@@ -555,7 +555,7 @@ public class GlGenericObjectRenderer implements IDhGenericRenderer
|
||||
|
||||
private void renderBoxGroupInstanced(
|
||||
IDhApiGenericObjectShaderProgram shaderProgram, DhApiRenderParam renderEventParam,
|
||||
RenderableBoxGroup boxGroup, Vec3d camPos,
|
||||
RenderableBoxGroup boxGroup, DhVec3d camPos,
|
||||
IProfilerWrapper profiler)
|
||||
{
|
||||
try (IProfilerWrapper.IProfileBlock render_profile = profiler.push("vertex setup"))
|
||||
@@ -656,7 +656,7 @@ public class GlGenericObjectRenderer implements IDhGenericRenderer
|
||||
private void renderBoxGroupDirect(
|
||||
IDhApiGenericObjectShaderProgram shaderProgram,
|
||||
DhApiRenderParam renderEventParam,
|
||||
RenderableBoxGroup boxGroup, Vec3d camPos,
|
||||
RenderableBoxGroup boxGroup, DhVec3d camPos,
|
||||
IProfilerWrapper profiler)
|
||||
{
|
||||
profiler.popPush("shared uniforms");
|
||||
|
||||
+8
-8
@@ -12,8 +12,8 @@ import com.seibel.distanthorizons.common.render.openGl.glObject.vertexAttribute.
|
||||
import com.seibel.distanthorizons.common.render.openGl.glObject.vertexAttribute.GlVertexPointer;
|
||||
import com.seibel.distanthorizons.common.wrappers.misc.LightMapWrapper;
|
||||
import com.seibel.distanthorizons.core.util.LodUtil;
|
||||
import com.seibel.distanthorizons.core.util.math.Mat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.Vec3f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhMat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhVec3f;
|
||||
|
||||
public class GlGenericObjectShaderProgram extends GlShaderProgram implements IDhApiGenericObjectShaderProgram
|
||||
{
|
||||
@@ -123,7 +123,7 @@ public class GlGenericObjectShaderProgram extends GlShaderProgram implements IDh
|
||||
DhApiVec3d camPos
|
||||
)
|
||||
{
|
||||
Mat4f projectionMvmMatrix = new Mat4f(renderParameters.dhProjectionMatrix);
|
||||
DhMat4f projectionMvmMatrix = new DhMat4f(renderParameters.dhProjectionMatrix);
|
||||
projectionMvmMatrix.multiply(renderParameters.dhModelViewMatrix);
|
||||
|
||||
super.bind();
|
||||
@@ -138,7 +138,7 @@ public class GlGenericObjectShaderProgram extends GlShaderProgram implements IDh
|
||||
LodUtil.getChunkPosFromDouble(boxGroup.getOriginBlockPos().z)
|
||||
));
|
||||
this.setUniform(this.instancedShaderOffsetSubChunkUniform,
|
||||
new Vec3f(
|
||||
new DhVec3f(
|
||||
LodUtil.getSubChunkPosFromDouble(boxGroup.getOriginBlockPos().x),
|
||||
LodUtil.getSubChunkPosFromDouble(boxGroup.getOriginBlockPos().y),
|
||||
LodUtil.getSubChunkPosFromDouble(boxGroup.getOriginBlockPos().z)
|
||||
@@ -151,7 +151,7 @@ public class GlGenericObjectShaderProgram extends GlShaderProgram implements IDh
|
||||
LodUtil.getChunkPosFromDouble(camPos.z)
|
||||
));
|
||||
this.setUniform(this.instancedShaderCameraSubChunkPosUniform,
|
||||
new Vec3f(
|
||||
new DhVec3f(
|
||||
LodUtil.getSubChunkPosFromDouble(camPos.x),
|
||||
LodUtil.getSubChunkPosFromDouble(camPos.y),
|
||||
LodUtil.getSubChunkPosFromDouble(camPos.z)
|
||||
@@ -201,14 +201,14 @@ public class GlGenericObjectShaderProgram extends GlShaderProgram implements IDh
|
||||
IDhApiRenderableBoxGroup boxGroup, DhApiRenderableBox box,
|
||||
DhApiVec3d camPos)
|
||||
{
|
||||
Mat4f projectionMvmMatrix = new Mat4f(renderParameters.dhProjectionMatrix);
|
||||
DhMat4f projectionMvmMatrix = new DhMat4f(renderParameters.dhProjectionMatrix);
|
||||
projectionMvmMatrix.multiply(renderParameters.dhModelViewMatrix);
|
||||
|
||||
Mat4f boxTransform = Mat4f.createTranslateMatrix(
|
||||
DhMat4f boxTransform = DhMat4f.createTranslateMatrix(
|
||||
(float) (box.minPos.x + boxGroup.getOriginBlockPos().x - camPos.x),
|
||||
(float) (box.minPos.y + boxGroup.getOriginBlockPos().y - camPos.y),
|
||||
(float) (box.minPos.z + boxGroup.getOriginBlockPos().z - camPos.z));
|
||||
boxTransform.multiply(Mat4f.createScaleMatrix(
|
||||
boxTransform.multiply(DhMat4f.createScaleMatrix(
|
||||
(float) (box.maxPos.x - box.minPos.x),
|
||||
(float) (box.maxPos.y - box.minPos.y),
|
||||
(float) (box.maxPos.z - box.minPos.z)));
|
||||
|
||||
+6
-6
@@ -27,8 +27,8 @@ import com.seibel.distanthorizons.api.objects.math.DhApiVec3i;
|
||||
import org.lwjgl.opengl.GL32;
|
||||
import org.lwjgl.system.MemoryStack;
|
||||
|
||||
import com.seibel.distanthorizons.core.util.math.Mat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.Vec3f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhMat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhVec3f;
|
||||
|
||||
|
||||
/**
|
||||
@@ -182,9 +182,9 @@ public class GlShaderProgram
|
||||
public void trySetUniform(int location, float value) { if (location != -1) { this.setUniform(location, value); } }
|
||||
|
||||
/** Requires a bound ShaderProgram. */
|
||||
public void setUniform(int location, Vec3f value) { GL32.glUniform3f(location, value.x, value.y, value.z); }
|
||||
/** @see GlShaderProgram#setUniform(int, Vec3f) */
|
||||
public void trySetUniform(int location, Vec3f value) { if (location != -1) { this.setUniform(location, value); } }
|
||||
public void setUniform(int location, DhVec3f value) { GL32.glUniform3f(location, value.x, value.y, value.z); }
|
||||
/** @see GlShaderProgram#setUniform(int, DhVec3f) */
|
||||
public void trySetUniform(int location, DhVec3f value) { if (location != -1) { this.setUniform(location, value); } }
|
||||
|
||||
/** Requires a bound ShaderProgram. */
|
||||
public void setUniform(int location, DhApiVec3i value) { GL32.glUniform3i(location, value.x, value.y, value.z); }
|
||||
@@ -226,7 +226,7 @@ public class GlShaderProgram
|
||||
private static int bufferIndex(int xIndex, int zIndex) { return (zIndex * 4) + xIndex; }
|
||||
|
||||
/** @see GlShaderProgram#setUniform(int, DhApiMat4f) */
|
||||
public void trySetUniform(int location, Mat4f value) { if (location != -1) { this.setUniform(location, value); } }
|
||||
public void trySetUniform(int location, DhMat4f value) { if (location != -1) { this.setUniform(location, value); } }
|
||||
|
||||
/**
|
||||
* Converts the color's RGBA values into values between 0 and 1. <br>
|
||||
|
||||
-1
@@ -28,7 +28,6 @@ import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector;
|
||||
import com.seibel.distanthorizons.common.render.openGl.util.GlAbstractShaderRenderer;
|
||||
import com.seibel.distanthorizons.core.render.RenderParams;
|
||||
import com.seibel.distanthorizons.core.util.RenderUtil;
|
||||
import com.seibel.distanthorizons.core.util.math.Mat4f;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftRenderWrapper;
|
||||
import org.lwjgl.opengl.GL32;
|
||||
|
||||
|
||||
-1
@@ -29,7 +29,6 @@ import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector;
|
||||
import com.seibel.distanthorizons.common.render.openGl.util.GlAbstractShaderRenderer;
|
||||
import com.seibel.distanthorizons.core.render.RenderParams;
|
||||
import com.seibel.distanthorizons.core.util.RenderUtil;
|
||||
import com.seibel.distanthorizons.core.util.math.Mat4f;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftRenderWrapper;
|
||||
import org.lwjgl.opengl.GL32;
|
||||
|
||||
|
||||
+3
-3
@@ -33,7 +33,7 @@ import com.seibel.distanthorizons.common.render.openGl.util.GlAbstractShaderRend
|
||||
import com.seibel.distanthorizons.core.render.RenderParams;
|
||||
import com.seibel.distanthorizons.core.util.LodUtil;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftClientWrapper;
|
||||
import com.seibel.distanthorizons.core.util.math.Mat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhMat4f;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftRenderWrapper;
|
||||
import org.lwjgl.opengl.GL32;
|
||||
|
||||
@@ -48,7 +48,7 @@ public class GlDhFogShader extends GlAbstractShaderRenderer
|
||||
|
||||
|
||||
public int frameBuffer;
|
||||
private Mat4f inverseMvmProjMatrix;
|
||||
private DhMat4f inverseMvmProjMatrix;
|
||||
private DhApiFogRenderParam fogRenderParams;
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ public class GlDhFogShader extends GlAbstractShaderRenderer
|
||||
|
||||
public void prepUniformObjects(DhApiMat4f modelViewProjectionMatrix, DhApiFogRenderParam fogRenderParams)
|
||||
{
|
||||
this.inverseMvmProjMatrix = new Mat4f(modelViewProjectionMatrix);
|
||||
this.inverseMvmProjMatrix = new DhMat4f(modelViewProjectionMatrix);
|
||||
this.inverseMvmProjMatrix.invert();
|
||||
|
||||
this.fogRenderParams = fogRenderParams;
|
||||
|
||||
+5
-5
@@ -26,7 +26,7 @@ import com.seibel.distanthorizons.common.render.openGl.postProcessing.GlScreenQu
|
||||
import com.seibel.distanthorizons.common.wrappers.minecraft.MinecraftGLWrapper;
|
||||
import com.seibel.distanthorizons.common.render.openGl.util.GlAbstractShaderRenderer;
|
||||
import com.seibel.distanthorizons.core.render.RenderParams;
|
||||
import com.seibel.distanthorizons.core.util.math.Mat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhMat4f;
|
||||
import org.lwjgl.opengl.GL32;
|
||||
|
||||
/**
|
||||
@@ -45,8 +45,8 @@ public class GlDhSSAOShader extends GlAbstractShaderRenderer
|
||||
|
||||
public int frameBuffer;
|
||||
|
||||
private Mat4f projection;
|
||||
private Mat4f invertedProjection;
|
||||
private DhMat4f projection;
|
||||
private DhMat4f invertedProjection;
|
||||
|
||||
|
||||
// uniforms
|
||||
@@ -95,9 +95,9 @@ public class GlDhSSAOShader extends GlAbstractShaderRenderer
|
||||
|
||||
public void setProjectionMatrix(DhApiMat4f projectionMatrix)
|
||||
{
|
||||
this.projection = new Mat4f(projectionMatrix);
|
||||
this.projection = new DhMat4f(projectionMatrix);
|
||||
|
||||
this.invertedProjection = new Mat4f(projectionMatrix);
|
||||
this.invertedProjection = new DhMat4f(projectionMatrix);
|
||||
this.invertedProjection.invert();
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -23,9 +23,9 @@ import com.seibel.distanthorizons.core.logging.DhLogger;
|
||||
import com.seibel.distanthorizons.core.logging.DhLoggerBuilder;
|
||||
import com.seibel.distanthorizons.core.render.RenderParams;
|
||||
import com.seibel.distanthorizons.core.util.RenderUtil;
|
||||
import com.seibel.distanthorizons.core.util.math.Mat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.Vec3d;
|
||||
import com.seibel.distanthorizons.core.util.math.Vec3f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhMat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhVec3d;
|
||||
import com.seibel.distanthorizons.core.util.math.DhVec3f;
|
||||
import com.seibel.distanthorizons.core.util.objects.SortedArraySet;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IProfilerWrapper;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IIrisAccessor;
|
||||
@@ -46,7 +46,7 @@ public class GlDhTerrainShaderProgram extends GlShaderProgram implements IDhApiS
|
||||
private static final MinecraftGLWrapper GLMC = MinecraftGLWrapper.INSTANCE;
|
||||
private static final IIrisAccessor IRIS_ACCESSOR = ModAccessorInjector.INSTANCE.get(IIrisAccessor.class);
|
||||
|
||||
private static final Vec3f MODEL_POS = new Vec3f();
|
||||
private static final DhVec3f MODEL_POS = new DhVec3f();
|
||||
/** single event object used to reduce GC pressure */
|
||||
private static final DhApiBeforeBufferRenderEvent.EventParam BEFORE_BUFFER_RENDER_EVENT_PARAM = new DhApiBeforeBufferRenderEvent.EventParam();
|
||||
|
||||
@@ -199,7 +199,7 @@ public class GlDhTerrainShaderProgram extends GlShaderProgram implements IDhApiS
|
||||
@Override
|
||||
public void fillUniformData(DhApiRenderParam renderParameters)
|
||||
{
|
||||
Mat4f combinedMatrix = new Mat4f(renderParameters.dhProjectionMatrix);
|
||||
DhMat4f combinedMatrix = new DhMat4f(renderParameters.dhProjectionMatrix);
|
||||
combinedMatrix.multiply(renderParameters.dhModelViewMatrix);
|
||||
|
||||
super.bind();
|
||||
@@ -246,7 +246,7 @@ public class GlDhTerrainShaderProgram extends GlShaderProgram implements IDhApiS
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setModelOffsetPos(DhApiVec3f modelOffsetPos) { this.setUniform(this.uModelOffset, new Vec3f(modelOffsetPos)); }
|
||||
public void setModelOffsetPos(DhApiVec3f modelOffsetPos) { this.setUniform(this.uModelOffset, new DhVec3f(modelOffsetPos)); }
|
||||
|
||||
@Override
|
||||
public int getId() { return this.id; }
|
||||
@@ -328,7 +328,7 @@ public class GlDhTerrainShaderProgram extends GlShaderProgram implements IDhApiS
|
||||
|
||||
// set uniforms and fire events
|
||||
{
|
||||
Vec3d camPos = renderEventParam.exactCameraPosition;
|
||||
DhVec3d camPos = renderEventParam.exactCameraPosition;
|
||||
MODEL_POS.set(
|
||||
(float) (bufferContainer.minCornerBlockPos.getX() - camPos.x),
|
||||
(float) (bufferContainer.minCornerBlockPos.getY() - camPos.y),
|
||||
|
||||
+3
-3
@@ -24,7 +24,7 @@ import java.nio.FloatBuffer;
|
||||
import com.seibel.distanthorizons.core.enums.EDhDirection;
|
||||
import com.seibel.distanthorizons.core.pos.blockPos.DhBlockPos;
|
||||
import com.seibel.distanthorizons.core.pos.DhChunkPos;
|
||||
import com.seibel.distanthorizons.core.util.math.Mat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhMat4f;
|
||||
|
||||
#if MC_VER <= MC_1_12_2
|
||||
import net.minecraft.util.EnumFacing;
|
||||
@@ -53,7 +53,7 @@ public class McObjectConverter
|
||||
//region
|
||||
|
||||
/** 4x4 float matrix converter */
|
||||
public static Mat4f Convert(
|
||||
public static DhMat4f Convert(
|
||||
#if MC_VER <= MC_1_12_2 org.joml.Matrix4f
|
||||
#elif MC_VER < MC_1_19_4 com.mojang.math.Matrix4f
|
||||
#elif MC_VER < MC_1_21_6 org.joml.Matrix4f
|
||||
@@ -63,7 +63,7 @@ public class McObjectConverter
|
||||
{
|
||||
FloatBuffer buffer = FloatBuffer.allocate(16);
|
||||
storeMatrix(mcMatrix, buffer);
|
||||
Mat4f matrix = new Mat4f(buffer);
|
||||
DhMat4f matrix = new DhMat4f(buffer);
|
||||
#if MC_VER > MC_1_12_2 && MC_VER < MC_1_19_4
|
||||
matrix.transpose(); // In 1.19.3 and later, we no longer need to transpose it
|
||||
#endif
|
||||
|
||||
+10
-11
@@ -63,8 +63,8 @@ import org.joml.Vector3f;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.world.IClientLevelWrapper;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.world.IDimensionTypeWrapper;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.world.ILevelWrapper;
|
||||
import com.seibel.distanthorizons.core.util.math.Vec3d;
|
||||
import com.seibel.distanthorizons.core.util.math.Vec3f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhVec3d;
|
||||
import com.seibel.distanthorizons.core.util.math.DhVec3f;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftRenderWrapper;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IImmersivePortalsAccessor;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IOptifineAccessor;
|
||||
@@ -108,7 +108,6 @@ import com.mojang.blaze3d.opengl.GlTexture;
|
||||
#else
|
||||
import net.minecraft.world.attribute.EnvironmentAttributes;
|
||||
import com.mojang.blaze3d.textures.GpuTexture;
|
||||
import org.joml.Vector4f;
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -163,20 +162,20 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper
|
||||
//=========//
|
||||
|
||||
@Override
|
||||
public Vec3f getLookAtVector()
|
||||
public DhVec3f getLookAtVector()
|
||||
{
|
||||
#if MC_VER <= MC_1_12_2
|
||||
net.minecraft.util.math.Vec3d lookVector = (MC.getRenderViewEntity().getLook(MC.getRenderPartialTicks()));
|
||||
return new Vec3f((float) lookVector.x, (float) lookVector.y, (float) lookVector.z);
|
||||
return new DhVec3f((float) lookVector.x, (float) lookVector.y, (float) lookVector.z);
|
||||
#elif MC_VER <= MC_1_21_10
|
||||
Camera camera = MC.gameRenderer.getMainCamera();
|
||||
return new Vec3f(camera.getLookVector().x(), camera.getLookVector().y(), camera.getLookVector().z());
|
||||
return new DhVec3f(camera.getLookVector().x(), camera.getLookVector().y(), camera.getLookVector().z());
|
||||
#elif MC_VER <= MC_26_1_2
|
||||
Camera camera = MC.gameRenderer.getMainCamera();
|
||||
return new Vec3f(camera.forwardVector().x(), camera.forwardVector().y(), camera.forwardVector().z());
|
||||
return new DhVec3f(camera.forwardVector().x(), camera.forwardVector().y(), camera.forwardVector().z());
|
||||
#else
|
||||
Camera camera = MC.gameRenderer.mainCamera();
|
||||
return new Vec3f(camera.forwardVector().x(), camera.forwardVector().y(), camera.forwardVector().z());
|
||||
return new DhVec3f(camera.forwardVector().x(), camera.forwardVector().y(), camera.forwardVector().z());
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -215,11 +214,11 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3d getCameraExactPosition()
|
||||
public DhVec3d getCameraExactPosition()
|
||||
{
|
||||
if (DelayedAccessors.IMMERSIVE_PORTALS != null)
|
||||
{
|
||||
Vec3d cameraPos = DelayedAccessors.IMMERSIVE_PORTALS.getActualCameraPos();
|
||||
DhVec3d cameraPos = DelayedAccessors.IMMERSIVE_PORTALS.getActualCameraPos();
|
||||
if (cameraPos != null) return cameraPos;
|
||||
}
|
||||
|
||||
@@ -237,7 +236,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper
|
||||
#else
|
||||
Vec3 projectedView = camera.position();
|
||||
#endif
|
||||
return new Vec3d(projectedView.x, projectedView.y, projectedView.z);
|
||||
return new DhVec3d(projectedView.x, projectedView.y, projectedView.z);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+3
-4
@@ -5,7 +5,7 @@ import com.google.common.collect.MapMaker;
|
||||
import com.seibel.distanthorizons.common.wrappers.world.ServerLevelWrapper;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.misc.IServerPlayerWrapper;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.world.IServerLevelWrapper;
|
||||
import com.seibel.distanthorizons.core.util.math.Vec3d;
|
||||
import com.seibel.distanthorizons.core.util.math.DhVec3d;
|
||||
#if MC_VER <= MC_1_12_2
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.network.NetHandlerPlayServer;
|
||||
@@ -19,7 +19,6 @@ import net.minecraft.server.network.ServerGamePacketListenerImpl;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
#endif
|
||||
|
||||
import java.net.SocketAddress;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
|
||||
#if MC_VER <= MC_1_12_2
|
||||
@@ -126,14 +125,14 @@ public class ServerPlayerWrapper implements IServerPlayerWrapper
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3d getPosition()
|
||||
public DhVec3d getPosition()
|
||||
{
|
||||
#if MC_VER <= MC_1_12_2
|
||||
BlockPos position = this.getServerPlayer().getPosition();
|
||||
return new Vec3d(position.getX(), position.getY(), position.getZ());
|
||||
#else
|
||||
Vec3 position = this.getServerPlayer().position();
|
||||
return new Vec3d(position.x, position.y, position.z);
|
||||
return new DhVec3d(position.x, position.y, position.z);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
+3
-4
@@ -26,14 +26,13 @@ public abstract class AbstractImmersivePortalsAccessorCommon {}
|
||||
import com.seibel.distanthorizons.common.wrappers.world.ClientLevelWrapper;
|
||||
import com.seibel.distanthorizons.core.pos.DhChunkPos;
|
||||
import com.seibel.distanthorizons.core.pos.blockPos.DhBlockPos;
|
||||
import com.seibel.distanthorizons.core.util.math.Vec3d;
|
||||
import com.seibel.distanthorizons.core.util.math.DhVec3d;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.AbstractImmersivePortalsAccessor;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.world.IClientLevelWrapper;
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
#if MC_VER > MC_1_19_2
|
||||
import org.joml.Matrix4f;
|
||||
#else
|
||||
#endif
|
||||
|
||||
@@ -51,7 +50,7 @@ public abstract class AbstractImmersivePortalsAccessorCommon extends AbstractImm
|
||||
@Nullable
|
||||
public static volatile DhChunkPos actualChunkPos;
|
||||
@Nullable
|
||||
public static volatile Vec3d actualCameraPos;
|
||||
public static volatile DhVec3d actualCameraPos;
|
||||
|
||||
|
||||
|
||||
@@ -69,7 +68,7 @@ public abstract class AbstractImmersivePortalsAccessorCommon extends AbstractImm
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public Vec3d getActualCameraPos() { return actualCameraPos; }
|
||||
public DhVec3d getActualCameraPos() { return actualCameraPos; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
+1
-1
Submodule coreSubProjects updated: e192abe666...44aed79e78
@@ -32,7 +32,7 @@ import com.seibel.distanthorizons.core.api.internal.SharedApi;
|
||||
import com.seibel.distanthorizons.core.dependencyInjection.ModAccessorInjector;
|
||||
import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector;
|
||||
import com.seibel.distanthorizons.core.logging.DhLoggerBuilder;
|
||||
import com.seibel.distanthorizons.core.util.math.Mat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhMat4f;
|
||||
import com.seibel.distanthorizons.core.util.threading.ThreadPoolUtil;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftClientWrapper;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.misc.IPluginPacketSender;
|
||||
|
||||
+3
-2
@@ -20,7 +20,8 @@
|
||||
package com.seibel.distanthorizons.fabric.mixins.client;
|
||||
|
||||
#if MC_VER < MC_1_19_4
|
||||
import com.seibel.distanthorizons.core.util.math.Mat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhMat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhVec3f;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.math.Matrix4f;
|
||||
@@ -152,7 +153,7 @@ public class MixinLevelRenderer
|
||||
// get the matrices from the OpenGL fixed pipeline
|
||||
float[] mcProjMatrixRaw = new float[16];
|
||||
GL32.glGetFloatv(GL32.GL_PROJECTION_MATRIX, mcProjMatrixRaw);
|
||||
ClientApi.RENDER_STATE.mcProjectionMatrix = new Mat4f(mcProjMatrixRaw);
|
||||
ClientApi.RENDER_STATE.mcProjectionMatrix = new DhMat4f(mcProjMatrixRaw);
|
||||
ClientApi.RENDER_STATE.mcProjectionMatrix.transpose();
|
||||
|
||||
ClientApi.RENDER_STATE.mcModelViewMatrix = McObjectConverter.Convert(matrixStackIn.last().pose());
|
||||
|
||||
+2
-2
@@ -40,7 +40,7 @@ import com.seibel.distanthorizons.common.wrappers.chunk.ChunkWrapper;
|
||||
import com.seibel.distanthorizons.common.wrappers.world.ClientLevelWrapper;
|
||||
import com.seibel.distanthorizons.core.config.Config;
|
||||
import com.seibel.distanthorizons.core.api.internal.ClientApi;
|
||||
import com.seibel.distanthorizons.core.util.math.Mat4f;
|
||||
import com.seibel.distanthorizons.core.util.math.DhMat4f;
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.client.renderer.LevelRenderer;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
@@ -126,7 +126,7 @@ public class MixinLevelRenderer
|
||||
// get the matrices from the OpenGL fixed pipeline
|
||||
float[] mcProjMatrixRaw = new float[16];
|
||||
GL15.glGetFloatv(GL15.GL_PROJECTION_MATRIX, mcProjMatrixRaw);
|
||||
ClientApi.RENDER_STATE.mcProjectionMatrix = new Mat4f(mcProjMatrixRaw);
|
||||
ClientApi.RENDER_STATE.mcProjectionMatrix = new DhMat4f(mcProjMatrixRaw);
|
||||
ClientApi.RENDER_STATE.mcProjectionMatrix.transpose();
|
||||
|
||||
ClientApi.RENDER_STATE.mcModelViewMatrix = McObjectConverter.Convert(matrixStackIn.last().pose());
|
||||
|
||||
Reference in New Issue
Block a user