From 8ea3db99629fec7be6bcc8967dbd54a6ebfd1945 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Fri, 8 Mar 2024 21:54:17 +0300 Subject: [PATCH] screen shader replaced with default --- res/shaders/screen.glslf | 6 +----- res/shaders/screen.glslv | 1 + src/graphics/Framebuffer.cpp | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/res/shaders/screen.glslf b/res/shaders/screen.glslf index a3bb7ff9..0117b59f 100644 --- a/res/shaders/screen.glslf +++ b/res/shaders/screen.glslf @@ -2,12 +2,8 @@ in vec2 v_coord; out vec4 f_color; uniform sampler2D u_texture0; -uniform float u_timer; void main(){ - vec2 coord = v_coord; - coord.x += sin(u_timer*5.0+coord.x*4.0) * 0.02; - coord.y += cos(u_timer*5.0+coord.y*4.0) * 0.02; - f_color = texture(u_texture0, coord); + f_color = texture(u_texture0, v_coord); } diff --git a/res/shaders/screen.glslv b/res/shaders/screen.glslv index 772e5f06..b319c53f 100644 --- a/res/shaders/screen.glslv +++ b/res/shaders/screen.glslv @@ -4,6 +4,7 @@ out vec2 v_coord; uniform ivec2 u_screenSize; uniform float u_timer; +uniform float u_dayTime; void main(){ v_coord = v_position * 0.5 + 0.5; diff --git a/src/graphics/Framebuffer.cpp b/src/graphics/Framebuffer.cpp index 7e19c4f5..5224bb2e 100644 --- a/src/graphics/Framebuffer.cpp +++ b/src/graphics/Framebuffer.cpp @@ -59,7 +59,6 @@ void Framebuffer::resize(uint width, uint height) { if (this->width == width && this->height == height) { return; } - GLuint texid = texture->getId(); texture->bind(); glTexImage2D(GL_TEXTURE_2D, 0, format, width, height, 0, format, GL_UNSIGNED_BYTE, nullptr); texture->unbind();