better compatibility with old postprocessing shaders

This commit is contained in:
Andrei "Akari" Alexeyev 2017-04-16 22:48:15 +03:00
parent b9c532c834
commit 587246e528

View file

@ -256,12 +256,11 @@ static void stage_draw_objects(void) {
} }
static void postprocess_prepare(FBO *fbo, Shader *s) { static void postprocess_prepare(FBO *fbo, Shader *s) {
float w = fbo->scale;
float h = fbo->scale;
glUniform1i(uniloc(s, "frames"), global.frames); glUniform1i(uniloc(s, "frames"), global.frames);
// deprecated, use gl_TextureMatrix[0]
glUniform2f(uniloc(s, "view_ofs"), 0, 0); glUniform2f(uniloc(s, "view_ofs"), 0, 0);
glUniform2f(uniloc(s, "view_scale"), VIEWPORT_W * w, VIEWPORT_H * h); glUniform2f(uniloc(s, "view_scale"), 1, 1);
} }
void stage_draw_foreground(void) { void stage_draw_foreground(void) {