fix iris rendering
This commit is contained in:
@@ -8,7 +8,7 @@ import com.seibel.distanthorizons.coreapi.ModInfo;
|
||||
* BLAZE_3D, <br><br>
|
||||
*
|
||||
* @since API 6.0.0
|
||||
* @version 2024-6-8
|
||||
* @version 2026-3-10
|
||||
*/
|
||||
public enum EDhApiRenderApi
|
||||
{
|
||||
|
||||
@@ -25,7 +25,6 @@ import com.seibel.distanthorizons.core.api.internal.SharedApi;
|
||||
import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector;
|
||||
import com.seibel.distanthorizons.core.level.IDhClientLevel;
|
||||
import com.seibel.distanthorizons.core.level.IDhLevel;
|
||||
import com.seibel.distanthorizons.core.render.renderer.BlazeLodRenderer;
|
||||
import com.seibel.distanthorizons.core.util.RenderUtil;
|
||||
import com.seibel.distanthorizons.core.world.AbstractDhWorld;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftRenderWrapper;
|
||||
@@ -82,16 +81,19 @@ public class DhApiRenderProxy implements IDhApiRenderProxy
|
||||
}
|
||||
|
||||
|
||||
public static int activeOpenGlDhDepthTextureId = -1;
|
||||
@Override
|
||||
public DhApiResult<Integer> getDhDepthTextureId()
|
||||
{
|
||||
int activeTexture = -1;//DhTerrainShaderProgram.OpenGlRenderState.INSTANCE.getActiveDepthTextureId();
|
||||
int activeTexture = activeOpenGlDhDepthTextureId;
|
||||
return (activeTexture == -1) ? DhApiResult.createFail("DH's depth texture hasn't been created and/or bound yet.", -1) : DhApiResult.createSuccess(activeTexture);
|
||||
}
|
||||
|
||||
public static int activeOpenGlDhColorTextureId = -1;
|
||||
@Override
|
||||
public DhApiResult<Integer> getDhColorTextureId()
|
||||
{
|
||||
int activeTexture = -1;//DhTerrainShaderProgram.OpenGlRenderState.INSTANCE.getActiveColorTextureId();
|
||||
int activeTexture = activeOpenGlDhColorTextureId;
|
||||
return (activeTexture == -1) ? DhApiResult.createFail("DH's color texture hasn't been created and/or bound yet.", -1) : DhApiResult.createSuccess(activeTexture);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ package com.seibel.distanthorizons.core.render.renderer;
|
||||
import com.seibel.distanthorizons.api.methods.events.abstractEvents.*;
|
||||
import com.seibel.distanthorizons.core.config.Config;
|
||||
import com.seibel.distanthorizons.core.dataObjects.render.bufferBuilding.LodBufferContainer;
|
||||
import com.seibel.distanthorizons.core.dependencyInjection.ModAccessorInjector;
|
||||
import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector;
|
||||
import com.seibel.distanthorizons.core.logging.DhLogger;
|
||||
import com.seibel.distanthorizons.core.logging.DhLoggerBuilder;
|
||||
@@ -32,6 +33,7 @@ import com.seibel.distanthorizons.core.util.math.Mat4f;
|
||||
import com.seibel.distanthorizons.core.util.objects.SortedArraySet;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftClientWrapper;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IProfilerWrapper;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IIrisAccessor;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.render.renderPass.*;
|
||||
import com.seibel.distanthorizons.coreapi.DependencyInjection.ApiEventInjector;
|
||||
|
||||
@@ -51,6 +53,7 @@ public class LodRenderer
|
||||
.build();
|
||||
|
||||
private static final IMinecraftClientWrapper MC = SingletonInjector.INSTANCE.get(IMinecraftClientWrapper.class);
|
||||
private static final IIrisAccessor IRIS_ACCESSOR = ModAccessorInjector.INSTANCE.get(IIrisAccessor.class);
|
||||
|
||||
public static final LodRenderer INSTANCE = new LodRenderer();
|
||||
|
||||
@@ -231,7 +234,8 @@ public class LodRenderer
|
||||
}
|
||||
|
||||
// far plane clip fading
|
||||
if (Config.Client.Advanced.Graphics.Quality.dhFadeFarClipPlane.get())
|
||||
if (Config.Client.Advanced.Graphics.Quality.dhFadeFarClipPlane.get()
|
||||
&& IRIS_ACCESSOR == null)
|
||||
{
|
||||
profiler.popPush("Fade Far Clip Fade");
|
||||
this.farFadeRenderer.render(renderParams);
|
||||
@@ -325,8 +329,6 @@ public class LodRenderer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//===============//
|
||||
// LOD rendering //
|
||||
//===============//
|
||||
|
||||
+3
@@ -19,6 +19,7 @@
|
||||
|
||||
package com.seibel.distanthorizons.core.wrapperInterfaces;
|
||||
|
||||
import com.seibel.distanthorizons.api.enums.config.EDhApiRenderApi;
|
||||
import com.seibel.distanthorizons.coreapi.interfaces.dependencyInjection.IBindable;
|
||||
|
||||
/**
|
||||
@@ -33,4 +34,6 @@ public interface IVersionConstants extends IBindable
|
||||
{
|
||||
String getMinecraftVersion();
|
||||
|
||||
EDhApiRenderApi getDefaultRenderer();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user