Skip to content

Commit 0018f55

Browse files
authored
Fix edge case in switching from None AA to MSAA (scp-fs2open#7454)
If you set AA level to None, save, then close the game, then re-enter the game and switch the AA mode to an MSAA mode, then the screen will just be black until the game is restarted. This does not happen when switching from None to FXAA because FXAA works because its post-pass uses `Scene_luminance_texture` and `Scene_ldr_texture`, which are always created as part of standard scene setup. There are two ways to fix this, either require AA mode to require a game restart (though that may complicate the lab) or allow resource allocation for SMAA always. Honestly I like the idea of keeping the lower-end machines optimized and not allocating for SMAA but simply running it always but for this PR have just allowed it always run. Happy to discuss whichever option folks think is best!
1 parent 946d15c commit 0018f55

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

code/graphics/opengl/gropenglpostprocessing.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,9 +1111,11 @@ static bool opengl_post_init_framebuffer()
11111111

11121112
opengl_setup_bloom_textures();
11131113

1114-
if (Gr_aa_mode != AntiAliasMode::None) {
1114+
// Always set up SMAA resources so the user can switch to an SMAA preset
1115+
// at runtime even when starting with a non-SMAA AA mode, such as None.
1116+
//if (Gr_aa_mode != AntiAliasMode::None) {
11151117
setup_smaa_resources();
1116-
}
1118+
//}
11171119

11181120
GL_state.BindFrameBuffer(0);
11191121

0 commit comments

Comments
 (0)