1
0
Fork 0

revert some improved rendering

This commit is contained in:
Sen 2025-08-31 11:40:53 +02:00
parent 9d31588d8d
commit 4862b7c9b5
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
4 changed files with 10 additions and 57 deletions

View file

@ -311,18 +311,6 @@ public class Client implements IThreadListener {
Client.CLIENT.setMidiDebug();
}
}
public static class TextureBoolFunction implements BoolFunction {
public void apply(BoolVar cv, boolean value) {
Client.CLIENT.updateTexture();
}
}
public static class TextureFloatFunction implements FloatFunction {
public void apply(FloatVar cv, float value) {
Client.CLIENT.updateTexture();
}
}
public static class MipmapFunction implements EnumFunction<MipmapType> {
public void apply(EnumVar cv, MipmapType value) {
@ -545,7 +533,6 @@ public class Client implements IThreadListener {
private long tick_update;
private long syncLimit;
private float anisotropyMax;
private float deltaX;
private float deltaY;
private float framerate;
@ -716,25 +703,8 @@ public class Client implements IThreadListener {
@Variable(name = "gl_light_blend", category = CVarCategory.RENDER, min = 0.0f, max = 1.0f, precision = 2, unit = "%", display = "Lichtüberdeckung")
public float lightBlend = 0.5f;
@Variable(name = "gl_dynlight_maxdist", category = CVarCategory.RENDER, min = 1.0f, max = 10000.0f, display = "Entfernung Lichtquelle")
public float lightDistVert = 128.0f;
@Variable(name = "gl_dynlight_viewdist", category = CVarCategory.RENDER, min = 1.0f, max = 10000.0f, display = "Entfernung Licht Kamera")
public float lightDistCam = 256.0f;
@Variable(name = "gl_dynlight_max", category = CVarCategory.RENDER, min = 0, max = 112, display = "Max. Dyn. Lichtquellen")
public int lightMaximum = 64;
@Variable(name = "gl_dynlight_chunkrange", category = CVarCategory.RENDER, min = 0, max = 64, display = "Lichtq. Sichtweite")
public int lightDistance = 8;
@Variable(name = "gl_tex_anisotropic", category = CVarCategory.RENDER, min = 1.0f, max = 16.0f, precision = 1, display = "Anisotrope Filterung", callback = TextureFloatFunction.class)
private float anisotopicFiltering = 16.0f;
@Variable(name = "gl_tex_mipmaps", category = CVarCategory.RENDER, display = "Mipmaps", callback = MipmapFunction.class)
private MipmapType mipmapType = MipmapType.LINEAR;
@Variable(name = "gl_tex_filter", category = CVarCategory.RENDER, display = "Texturfilterung", callback = TextureBoolFunction.class)
private boolean textureFiltering = true;
@Variable(name = "gl_specular", category = CVarCategory.RENDER, display = "Beleuchtungseffekte")
public boolean specularColors = true;
@Variable(name = "gl_flat_shading", category = CVarCategory.RENDER, display = "Flaches Shading")
public boolean flatShading = false;
@Variable(name = "gl_use_shader", category = CVarCategory.RENDER, display = "Shader verwenden")
public boolean useShader = true;
@ -889,7 +859,6 @@ public class Client implements IThreadListener {
this.textureManager = new TextureManager();
this.textureManager.onReload();
this.soundManager = new SoundManager(this);
Log.RENDER.debug("Maximale Anisotropie: %.1f", this.anisotropyMax = GL46.glGetFloat(GL46.GL_MAX_TEXTURE_MAX_ANISOTROPY));
Log.RENDER.debug("Maximale Texturgröße: %d", GL46.glGetInteger(GL46.GL_MAX_TEXTURE_SIZE));
GlState.enableTexture2D();
GlState.shadeModel(GL46.GL_SMOOTH);
@ -2055,9 +2024,7 @@ public class Client implements IThreadListener {
this.dimensionName) + "\n" +
String.format("Licht: %06x", chunk.getLight(pos)) + " (" + (this.world.dimension.hasSkyLight() ? + Renderer.getSkyLightFor(pos.getY()) + " Himmel, " : "")
+ chunk.getLight(pos) + " Blöcke, " + String.format(
"%.1f", this.renderer.getSunBrightness(1.0f) * 15.0f) + " Welt), A: "
+ String.format("%.1f ° (%.1f, %.1f)", this.renderer.getCelestialAngle(1.0f), !this.world.dimension.hasDaylight() ? 0.0f : ExtMath.cos((-90.0f + this.renderer.getCelestialAngle(1.0f)) / 180.0f * (float)Math.PI),
!this.world.dimension.hasDaylight() ? -1.0f : ExtMath.sin((-90.0f + this.renderer.getCelestialAngle(1.0f)) / 180.0f * (float)Math.PI)) + "\n" +
"%.1f", this.renderer.getSunBrightness(1.0f) * 15.0f) + " Welt), A: " + String.format("%.1f °", this.renderer.getCelestialAngle(1.0f)) + "\n" +
String.format("Zeit: %s" + (this.world.dimension.hasRotation() ? ", R %d / %d T" : "") + (this.world.dimension.hasOrbit() ? ", U %d / %d T" : ""),
this.world.formatEpochSimple(),
this.world.getRotation(),
@ -3873,7 +3840,7 @@ public class Client implements IThreadListener {
public void updateTexture() {
this.textureManager.bindTexture(TextureMap.BLOCKS);
TextureUtil.setParams(this.textureFiltering, this.mipmapType != MipmapType.NONE, this.mipmapType == MipmapType.LINEAR, Math.min(this.anisotopicFiltering, this.anisotropyMax));
TextureUtil.setParams(this.mipmapType != MipmapType.NONE, this.mipmapType == MipmapType.LINEAR);
}
private static byte[] genTriwave(int w, int h, int color1, int color2, int color3, int color4, int color5, int color6) {