diff --git a/src/DETHRACE/common/oil.c b/src/DETHRACE/common/oil.c index b3857227..7c8a4c59 100644 --- a/src/DETHRACE/common/oil.c +++ b/src/DETHRACE/common/oil.c @@ -41,6 +41,8 @@ void InitOilSpills() { the_material->flags |= BR_MATF_LIGHT; the_material->flags |= BR_MATF_PERSPECTIVE; the_material->flags |= BR_MATF_SMOOTH; + // TODO: added by dethrace, investigate why oil spills in OG do not need this flag set to render correctly + the_material->flags |= BR_MATF_TWO_SIDED; the_material->index_range = 0; the_material->colour_map = NULL; BrMatrix23Identity(&the_material->map_transform); diff --git a/src/harness/renderers/gl/gl_renderer.c b/src/harness/renderers/gl/gl_renderer.c index eda17217..9fc3737a 100644 --- a/src/harness/renderers/gl/gl_renderer.c +++ b/src/harness/renderers/gl/gl_renderer.c @@ -501,6 +501,12 @@ void setActiveMaterial(tStored_material* material) { glUniform1i(uniforms_3d.light_value, -1); } + if (material->flags & (BR_MATF_TWO_SIDED | BR_MATF_ALWAYS_VISIBLE)) { + glDisable(GL_CULL_FACE); + } else { + glEnable(GL_CULL_FACE); + } + if (material->pixelmap) { tStored_pixelmap* stored_px = material->pixelmap->stored; if (stored_px != NULL) {