@@ -2538,7 +2538,7 @@ static void R_CreateWorldVBO() {
25382538 // HACK: portals: don't use VBO because when adding a portal we have to read back the verts CPU-side
25392539 // Autosprite: don't use VBO because verts are rewritten each time based on view origin
25402540 if ( surface->shader ->isPortal || surface->shader ->autoSpriteMode != 0 ) {
2541- if ( glConfig2.usingMaterialSystem && surface-> shader -> autoSpriteMode ) {
2541+ if ( glConfig2.usingMaterialSystem ) {
25422542 materialSystem.autospriteSurfaces .push_back ( surface );
25432543 }
25442544
@@ -2548,10 +2548,15 @@ static void R_CreateWorldVBO() {
25482548 continue ;
25492549 }
25502550
2551- if ( glConfig2.usingMaterialSystem && surface->shader ->isSky
2552- && std::find ( materialSystem.skyShaders .begin (), materialSystem.skyShaders .end (), surface->shader )
2553- == materialSystem.skyShaders .end () ) {
2554- materialSystem.skyShaders .emplace_back ( surface->shader );
2551+ if ( glConfig2.usingMaterialSystem && surface->shader ->isSky ) {
2552+ if ( std::find ( materialSystem.skyShaders .begin (), materialSystem.skyShaders .end (), surface->shader )
2553+ == materialSystem.skyShaders .end () ) {
2554+ materialSystem.skyShaders .emplace_back ( surface->shader );
2555+ }
2556+
2557+ /* Sky brushes are currently not used by the material system,
2558+ but they still have to go into the VBO for the core renderer */
2559+ surface->skyBrush = true ;
25552560 }
25562561
25572562 if ( *surface->data == surfaceType_t::SF_FACE || *surface->data == surfaceType_t::SF_GRID
0 commit comments