Add smoke particle emitters with ember sparks and enable 4x MSAA

Replace UV scroll workaround for chimney smoke with proper GL_POINTS
particle system. Smoke particles rise, expand, drift, and fade over
4-7 seconds. One in eight particles spawns as a bright orange/red
ember spark. Enable 4x multisample antialiasing for smoother edges
on player models, fences, and foliage.
This commit is contained in:
Kelsi 2026-02-04 14:37:32 -08:00
parent 11a4958e84
commit c9adcd3d96
4 changed files with 249 additions and 36 deletions

View file

@ -31,6 +31,8 @@ bool Window::initialize() {
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 4);
// Create window
Uint32 flags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN;
@ -82,6 +84,7 @@ bool Window::initialize() {
LOG_INFO("Vendor: ", glGetString(GL_VENDOR));
// Set up OpenGL defaults
glEnable(GL_MULTISAMPLE);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LESS);
glEnable(GL_CULL_FACE);