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