thing
This commit is contained in:
@@ -680,7 +680,7 @@ public class ModelFactory {
|
||||
private static final int LAYERS = Integer.numberOfTrailingZeros(MODEL_TEXTURE_SIZE);
|
||||
//TODO: redo to batch blit, instead of 6 seperate blits, and also fix mipping
|
||||
private void putTextures(int id, ColourDepthTextureData[] textures) {
|
||||
if (MODEL_TEXTURE_SIZE != 16) {throw new IllegalStateException("THIS METHOD MUST BE REDONE IF THIS CONST CHANGES");}
|
||||
//if (MODEL_TEXTURE_SIZE != 16) {throw new IllegalStateException("THIS METHOD MUST BE REDONE IF THIS CONST CHANGES");}
|
||||
|
||||
//TODO: need to use a write mask to see what pixels must be used to contribute to mipping
|
||||
// as in, using the depth/stencil info, check if pixel was written to, if so, use that pixel when blending, else dont
|
||||
|
||||
@@ -24,14 +24,14 @@ public class ModelStore {
|
||||
public ModelStore() {
|
||||
this.modelBuffer = new GlBuffer(MODEL_SIZE * (1<<16)).name("ModelData");
|
||||
this.modelColourBuffer = new GlBuffer(4 * (1<<16)).name("ModelColour");
|
||||
this.textures = new GlTexture().store(GL_RGBA8, 4, ModelFactory.MODEL_TEXTURE_SIZE*3*256,ModelFactory.MODEL_TEXTURE_SIZE*2*256).name("ModelTextures");
|
||||
this.textures = new GlTexture().store(GL_RGBA8, Integer.numberOfTrailingZeros(ModelFactory.MODEL_TEXTURE_SIZE), ModelFactory.MODEL_TEXTURE_SIZE*3*256,ModelFactory.MODEL_TEXTURE_SIZE*2*256).name("ModelTextures");
|
||||
|
||||
|
||||
|
||||
glSamplerParameteri(this.blockSampler, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR);
|
||||
glSamplerParameteri(this.blockSampler, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
glSamplerParameteri(this.blockSampler, GL_TEXTURE_MIN_LOD, 0);
|
||||
glSamplerParameteri(this.blockSampler, GL_TEXTURE_MAX_LOD, 4);
|
||||
glSamplerParameteri(this.blockSampler, GL_TEXTURE_MAX_LOD, Integer.numberOfTrailingZeros(ModelFactory.MODEL_TEXTURE_SIZE));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user