add visuals
This commit is contained in:
parent
1bf4578ad8
commit
220a8432ef
13 changed files with 81 additions and 93 deletions
|
@ -707,9 +707,9 @@ 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 Lichtq. -> Mitte")
|
||||
@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 Lichtq. -> Kamera")
|
||||
@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", callback = MaxLightFunction.class)
|
||||
|
@ -864,6 +864,7 @@ public class Client implements IThreadListener {
|
|||
this.renderItem.onReload();
|
||||
this.renderer.cacheSprites();
|
||||
EntityTexManager.loadNpcTextures();
|
||||
this.updateTexture();
|
||||
this.renderer.loadRenderers();
|
||||
this.logFeed("Texturen wurden neu geladen");
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ public enum Shader {
|
|||
context.vec("screen", (float)Client.CLIENT.fbRawX, (float)Client.CLIENT.fbRawY);
|
||||
context.matrix("view", MatrixState.getModelView());
|
||||
context.matrix("projection", MatrixState.getProjection());
|
||||
context.vec("time", (float)Util.ftime());
|
||||
|
||||
float angle = -90.0f + Client.CLIENT.world.getCelestialAngle(Client.CLIENT.getTickFraction());
|
||||
|
||||
|
@ -64,15 +65,6 @@ public enum Shader {
|
|||
VIS("vis", "vis", null, context -> {
|
||||
context.matrix("view", MatrixState.getModelView());
|
||||
context.matrix("projection", MatrixState.getProjection());
|
||||
}),
|
||||
|
||||
GRID("grid", "grid", null, context -> {
|
||||
context.vec("clip_near", Client.CLIENT.renderer.getNearPlane());
|
||||
context.vec("clip_far", Client.CLIENT.renderer.getFarPlane());
|
||||
context.vec("screen", (float)Client.CLIENT.fbRawX, (float)Client.CLIENT.fbRawY);
|
||||
context.matrix("view", MatrixState.getModelView());
|
||||
context.matrix("projection", MatrixState.getProjection());
|
||||
context.vec("time", (float)Util.ftime());
|
||||
});
|
||||
|
||||
// BLIT("blit", "blit", context -> context.integer("tex", 0), context -> {
|
||||
|
|
|
@ -112,20 +112,14 @@ public class TextureUtil
|
|||
return img;
|
||||
}
|
||||
|
||||
static
|
||||
{
|
||||
int i = -16777216;
|
||||
int j = -524040;
|
||||
int[] aint = new int[] { -524040, -524040, -524040, -524040, -524040, -524040, -524040, -524040};
|
||||
int[] aint1 = new int[] { -16777216, -16777216, -16777216, -16777216, -16777216, -16777216, -16777216, -16777216};
|
||||
int k = aint.length;
|
||||
|
||||
for (int l = 0; l < 16; ++l)
|
||||
{
|
||||
System.arraycopy(l < k ? aint : aint1, 0, MISSING_DATA, 16 * l, k);
|
||||
System.arraycopy(l < k ? aint1 : aint, 0, MISSING_DATA, 16 * l + k, k);
|
||||
}
|
||||
|
||||
MISSING.updateTexture();
|
||||
}
|
||||
static {
|
||||
int color1 = 0xff000000;
|
||||
int color2 = 0xffff00ff;
|
||||
for(int x = 0; x < 16; x++) {
|
||||
for(int y = 0; y < 16; y++) {
|
||||
MISSING_DATA[y * 16 + x] = ((x >> 1 & 1) ^ (y >> 1 & 1)) == 0 ? color1 : color2;
|
||||
}
|
||||
}
|
||||
MISSING.updateTexture();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue