[jak2] new glow fix (#3067)

Fix a typo in the shader. (fixes
https://github.com/open-goal/jak-project/issues/3045, and fixes fadeout
when glows move offscreen on the bottom).

Also, try a different format for the depth blit, in an attempt to fix
this issue https://github.com/open-goal/jak-project/issues/3065.
This commit is contained in:
water111 2023-10-07 09:37:06 -07:00 committed by GitHub
parent 395c98db19
commit 5f8415320b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -9,7 +9,7 @@ in vec2 tex_coord;
void main() {
vec2 texture_coords = vec2(tex_coord.x, tex_coord.y);
out_color = vec4(0, 0, 0, 0);
if (texture_coords.x < 0 || texture_coords.x > 1 || texture_coords.y > 1 || texture_coords.x < 0) {
if (texture_coords.x < 0 || texture_coords.x > 1 || texture_coords.y > 1 || texture_coords.y < 0) {
gl_FragDepth = 1;
} else {
gl_FragDepth = texture(tex, texture_coords).r;

View file

@ -192,7 +192,7 @@ GlowRenderer::GlowRenderer() {
glBindTexture(GL_TEXTURE_2D, m_ogl.probe_fbo_depth_tex);
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, m_ogl.probe_fbo_w, m_ogl.probe_fbo_h, 0,
GL_DEPTH_COMPONENT, GL_FLOAT, NULL);
GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D,
m_ogl.probe_fbo_depth_tex, 0);