screen shader replaced with default
This commit is contained in:
parent
8328db74fe
commit
8ea3db9962
@ -2,12 +2,8 @@ in vec2 v_coord;
|
|||||||
out vec4 f_color;
|
out vec4 f_color;
|
||||||
|
|
||||||
uniform sampler2D u_texture0;
|
uniform sampler2D u_texture0;
|
||||||
uniform float u_timer;
|
|
||||||
|
|
||||||
void main(){
|
void main(){
|
||||||
vec2 coord = v_coord;
|
f_color = texture(u_texture0, 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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@ out vec2 v_coord;
|
|||||||
|
|
||||||
uniform ivec2 u_screenSize;
|
uniform ivec2 u_screenSize;
|
||||||
uniform float u_timer;
|
uniform float u_timer;
|
||||||
|
uniform float u_dayTime;
|
||||||
|
|
||||||
void main(){
|
void main(){
|
||||||
v_coord = v_position * 0.5 + 0.5;
|
v_coord = v_position * 0.5 + 0.5;
|
||||||
|
|||||||
@ -59,7 +59,6 @@ void Framebuffer::resize(uint width, uint height) {
|
|||||||
if (this->width == width && this->height == height) {
|
if (this->width == width && this->height == height) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GLuint texid = texture->getId();
|
|
||||||
texture->bind();
|
texture->bind();
|
||||||
glTexImage2D(GL_TEXTURE_2D, 0, format, width, height, 0, format, GL_UNSIGNED_BYTE, nullptr);
|
glTexImage2D(GL_TEXTURE_2D, 0, format, width, height, 0, format, GL_UNSIGNED_BYTE, nullptr);
|
||||||
texture->unbind();
|
texture->unbind();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user