tweeks for scaling
This commit is contained in:
@@ -171,12 +171,15 @@ public class VoxyRenderSystem {
|
||||
int[] dims = new int[4];
|
||||
glGetIntegerv(GL_VIEWPORT, dims);
|
||||
|
||||
int width = dims[2];
|
||||
int height = dims[3];
|
||||
|
||||
viewport
|
||||
.setVanillaProjection(matrices.projection())
|
||||
.setProjection(projection)
|
||||
.setModelView(new Matrix4f(matrices.modelView()))
|
||||
.setCamera(cameraX, cameraY, cameraZ)
|
||||
.setScreenSize(dims[2], dims[3])
|
||||
.setScreenSize(width, height)
|
||||
.setFogParameters(fogParameters)
|
||||
.update();
|
||||
viewport.frameId++;
|
||||
@@ -208,6 +211,8 @@ public class VoxyRenderSystem {
|
||||
int[] dims = new int[4];
|
||||
glGetIntegerv(GL_VIEWPORT, dims);
|
||||
|
||||
glViewport(0,0, viewport.width, viewport.height);
|
||||
|
||||
//var target = DefaultTerrainRenderPasses.CUTOUT.getTarget();
|
||||
//boundFB = ((net.minecraft.client.texture.GlTexture) target.getColorAttachment()).getOrCreateFramebuffer(((GlBackend) RenderSystem.getDevice()).getFramebufferManager(), target.getDepthAttachment());
|
||||
if (boundFB == 0) {
|
||||
@@ -248,6 +253,7 @@ public class VoxyRenderSystem {
|
||||
TimingStatistics.postDynamic.stop();
|
||||
|
||||
glBindFramebuffer(GlConst.GL_FRAMEBUFFER, oldFB);
|
||||
glViewport(dims[0], dims[1], dims[2], dims[3]);
|
||||
|
||||
{//Reset state manager stuffs
|
||||
glUseProgram(0);
|
||||
|
||||
@@ -418,6 +418,7 @@ public class IrisVoxyRenderPipelineData {
|
||||
public record SSBOSet(String layout, IntConsumer bindingFunction){}
|
||||
private record SSBOBinding(int irisIndex, int bindingOffset) {}
|
||||
private static SSBOSet createSSBOLayouts(Int2ObjectMap<String> ssbos, ShaderStorageBufferHolder ssboStore) {
|
||||
if (ssboStore == null) return null;//If there is no store, there cannot be any ssbos
|
||||
if (ssbos.isEmpty()) return null;
|
||||
String header = "";
|
||||
if (ssbos.containsKey(-1)) header = ssbos.remove(-1);
|
||||
|
||||
Reference in New Issue
Block a user