fix rendering size on nonstandard monitor
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
a44d04ed6c
commit
bc74b91066
@ -1,3 +1,3 @@
|
||||
#maven.buildNumber.plugin properties file
|
||||
#Fri Dec 06 21:26:11 EST 2024
|
||||
buildNumber=600
|
||||
#Tue Dec 24 16:29:47 EST 2024
|
||||
buildNumber=603
|
||||
|
||||
@ -8,9 +8,9 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
#undef electrosphere_server_fluid_simulator_FluidAcceleratedSimulator_SIMULATE_TIMESTEP
|
||||
#define electrosphere_server_fluid_simulator_FluidAcceleratedSimulator_SIMULATE_TIMESTEP 0.01f
|
||||
#define electrosphere_server_fluid_simulator_FluidAcceleratedSimulator_SIMULATE_TIMESTEP 0.1f
|
||||
#undef electrosphere_server_fluid_simulator_FluidAcceleratedSimulator_GRAVITY_CONST
|
||||
#define electrosphere_server_fluid_simulator_FluidAcceleratedSimulator_GRAVITY_CONST -1000.0f
|
||||
#define electrosphere_server_fluid_simulator_FluidAcceleratedSimulator_GRAVITY_CONST -100.0f
|
||||
/*
|
||||
* Class: electrosphere_server_fluid_simulator_FluidAcceleratedSimulator
|
||||
* Method: init
|
||||
|
||||
@ -170,7 +170,7 @@ public class Globals {
|
||||
public static boolean RUN_DEMO = false;
|
||||
public static boolean RUN_CLIENT = true;
|
||||
public static boolean RUN_HIDDEN = false; //glfw session will be created with hidden window
|
||||
public static boolean RUN_AUDIO = true;
|
||||
public static boolean RUN_AUDIO = false;
|
||||
public static boolean RUN_SCRIPTS = true;
|
||||
public static boolean RUN_PHYSICS = true; //toggles whether physics is run or not
|
||||
public static int clientCharacterID;
|
||||
|
||||
@ -41,7 +41,8 @@ public class UserSettings {
|
||||
*/
|
||||
boolean graphicsPerformanceEnableFoliageManager;
|
||||
|
||||
//resolution
|
||||
//resolution to render at
|
||||
//this will be scaled to displayWidth/displayHeight after rendering
|
||||
int renderResolutionX;
|
||||
int renderResolutionY;
|
||||
//debug
|
||||
|
||||
@ -314,12 +314,12 @@ public class RenderingEngine {
|
||||
defaultFramebuffer = new Framebuffer(GL_DEFAULT_FRAMEBUFFER);
|
||||
|
||||
//generate framebuffers
|
||||
Texture screenTextureColor = FramebufferUtils.generateScreenTextureColorAlpha(openGLState, Globals.WINDOW_WIDTH, Globals.WINDOW_HEIGHT);
|
||||
Texture screenTextureColor = FramebufferUtils.generateScreenTextureColorAlpha(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY());
|
||||
RenderingEngine.screenTextureColor = screenTextureColor;
|
||||
Texture screenTextureDepth = FramebufferUtils.generateScreenTextureDepth(openGLState, Globals.WINDOW_WIDTH, Globals.WINDOW_HEIGHT);
|
||||
Texture screenTextureDepth = FramebufferUtils.generateScreenTextureDepth(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY());
|
||||
RenderingEngine.screenTextureDepth = screenTextureDepth;
|
||||
try {
|
||||
Framebuffer screenFramebuffer = FramebufferUtils.generateScreenTextureFramebuffer(openGLState, Globals.WINDOW_WIDTH, Globals.WINDOW_HEIGHT, screenTextureColor, screenTextureDepth);
|
||||
Framebuffer screenFramebuffer = FramebufferUtils.generateScreenTextureFramebuffer(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY(), screenTextureColor, screenTextureDepth);
|
||||
RenderingEngine.screenFramebuffer = screenFramebuffer;
|
||||
} catch (Exception e){
|
||||
LoggerInterface.loggerRenderer.ERROR(e);
|
||||
|
||||
@ -37,10 +37,10 @@ public class PostProcessingPipeline implements RenderPipeline {
|
||||
*/
|
||||
public void init(OpenGLState openGLState){
|
||||
postProcessingShader = VisualShader.loadSpecificShader("Shaders/core/postprocessing/postprocessing.vs", "Shaders/core/postprocessing/postprocessing.fs");
|
||||
Texture screenTextureColor = FramebufferUtils.generateScreenTextureColorAlpha(openGLState, Globals.WINDOW_WIDTH, Globals.WINDOW_HEIGHT);
|
||||
Texture screenTextureDepth = FramebufferUtils.generateScreenTextureDepth(openGLState, Globals.WINDOW_WIDTH, Globals.WINDOW_HEIGHT);
|
||||
Texture screenTextureColor = FramebufferUtils.generateScreenTextureColorAlpha(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY());
|
||||
Texture screenTextureDepth = FramebufferUtils.generateScreenTextureDepth(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY());
|
||||
try {
|
||||
postProcessBuffer = FramebufferUtils.generateScreenTextureFramebuffer(openGLState, Globals.WINDOW_WIDTH, Globals.WINDOW_HEIGHT, screenTextureColor, screenTextureDepth);
|
||||
postProcessBuffer = FramebufferUtils.generateScreenTextureFramebuffer(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY(), screenTextureColor, screenTextureDepth);
|
||||
} catch (Exception e){
|
||||
LoggerInterface.loggerRenderer.ERROR(e);
|
||||
}
|
||||
@ -54,7 +54,7 @@ public class PostProcessingPipeline implements RenderPipeline {
|
||||
//
|
||||
openGLState.glDepthTest(false);
|
||||
openGLState.glBlend(false);
|
||||
openGLState.glViewport(Globals.WINDOW_WIDTH, Globals.WINDOW_HEIGHT);
|
||||
openGLState.glViewport(Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY());
|
||||
|
||||
|
||||
postProcessBuffer.bind(openGLState);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user