@@ -977,7 +977,7 @@ void RasterizerSceneGLES3::_update_sky_radiance(RID p_env, const Projection &p_p
977977 glBindFramebuffer (GL_FRAMEBUFFER, sky->radiance_framebuffer );
978978
979979 scene_state.reset_gl_state ();
980- scene_state.set_gl_cull_mode (GLES3::SceneShaderData::CULL_DISABLED );
980+ scene_state.set_gl_cull_mode (RS::CULL_MODE_DISABLED );
981981 scene_state.enable_gl_blend (false );
982982
983983 for (int i = 0 ; i < 6 ; i++) {
@@ -1000,7 +1000,7 @@ void RasterizerSceneGLES3::_update_sky_radiance(RID p_env, const Projection &p_p
10001000 } else {
10011001 if (sky_mode == RS::SKY_MODE_INCREMENTAL && sky->processing_layer < max_processing_layer) {
10021002 scene_state.reset_gl_state ();
1003- scene_state.set_gl_cull_mode (GLES3::SceneShaderData::CULL_DISABLED );
1003+ scene_state.set_gl_cull_mode (RS::CULL_MODE_DISABLED );
10041004 scene_state.enable_gl_blend (false );
10051005
10061006 cubemap_filter->filter_radiance (sky->raw_radiance , sky->radiance , sky->radiance_framebuffer , sky->radiance_size , sky->mipmap_count , sky->processing_layer );
@@ -1433,6 +1433,10 @@ void RasterizerSceneGLES3::_fill_render_list(RenderListType p_render_list, const
14331433 if (surf->flags & GeometryInstanceSurface::FLAG_PASS_SHADOW) {
14341434 rl->add_element (surf);
14351435 }
1436+ } else if (p_pass_mode == PASS_MODE_MATERIAL) {
1437+ if (surf->flags & (GeometryInstanceSurface::FLAG_PASS_DEPTH | GeometryInstanceSurface::FLAG_PASS_OPAQUE | GeometryInstanceSurface::FLAG_PASS_ALPHA)) {
1438+ rl->add_element (surf);
1439+ }
14361440 } else {
14371441 if (surf->flags & (GeometryInstanceSurface::FLAG_PASS_DEPTH | GeometryInstanceSurface::FLAG_PASS_OPAQUE)) {
14381442 rl->add_element (surf);
@@ -2210,7 +2214,7 @@ void RasterizerSceneGLES3::_render_shadow_pass(RID p_light, RID p_shadow_atlas,
22102214 scene_state.enable_gl_depth_test (false );
22112215 scene_state.enable_gl_depth_draw (true );
22122216 glDisable (GL_CULL_FACE);
2213- scene_state.cull_mode = GLES3::SceneShaderData::CULL_DISABLED ;
2217+ scene_state.cull_mode = RS::CULL_MODE_DISABLED ;
22142218 glBindFramebuffer (GL_FRAMEBUFFER, GLES3::TextureStorage::system_fbo);
22152219}
22162220
@@ -2587,7 +2591,7 @@ void RasterizerSceneGLES3::render_scene(const Ref<RenderSceneBuffers> &p_render_
25872591 scene_state.enable_gl_depth_draw (false );
25882592 scene_state.enable_gl_depth_test (false );
25892593 scene_state.enable_gl_blend (false );
2590- scene_state.set_gl_cull_mode (GLES3::SceneShaderData::CULL_BACK );
2594+ scene_state.set_gl_cull_mode (RS::CULL_MODE_BACK );
25912595
25922596 Ref<CameraFeed> feed = CameraServer::get_singleton ()->get_feed_by_id (camera_feed_id);
25932597
@@ -2615,7 +2619,7 @@ void RasterizerSceneGLES3::render_scene(const Ref<RenderSceneBuffers> &p_render_
26152619
26162620 scene_state.enable_gl_depth_test (true );
26172621 scene_state.enable_gl_blend (false );
2618- scene_state.set_gl_cull_mode (GLES3::SceneShaderData::CULL_BACK );
2622+ scene_state.set_gl_cull_mode (RS::CULL_MODE_BACK );
26192623
26202624 Transform3D transform = render_data.cam_transform ;
26212625 Projection projection = render_data.cam_projection ;
@@ -3099,19 +3103,19 @@ void RasterizerSceneGLES3::_render_list_template(RenderListParameters *p_params,
30993103 }
31003104
31013105 // Find cull variant.
3102- GLES3::SceneShaderData::Cull cull_mode = shader->cull_mode ;
3106+ RS::CullMode cull_mode = shader->cull_mode ;
31033107
31043108 if (p_pass_mode == PASS_MODE_MATERIAL || (surf->flags & GeometryInstanceSurface::FLAG_USES_DOUBLE_SIDED_SHADOWS)) {
3105- cull_mode = GLES3::SceneShaderData::CULL_DISABLED ;
3109+ cull_mode = RS::CULL_MODE_DISABLED ;
31063110 } else {
31073111 bool mirror = inst->mirror ;
31083112 if (p_params->reverse_cull ) {
31093113 mirror = !mirror;
31103114 }
3111- if (cull_mode == GLES3::SceneShaderData::CULL_FRONT && mirror) {
3112- cull_mode = GLES3::SceneShaderData::CULL_BACK ;
3113- } else if (cull_mode == GLES3::SceneShaderData::CULL_BACK && mirror) {
3114- cull_mode = GLES3::SceneShaderData::CULL_FRONT ;
3115+ if (cull_mode == RS::CULL_MODE_FRONT && mirror) {
3116+ cull_mode = RS::CULL_MODE_BACK ;
3117+ } else if (cull_mode == RS::CULL_MODE_BACK && mirror) {
3118+ cull_mode = RS::CULL_MODE_FRONT ;
31153119 }
31163120 }
31173121
@@ -3832,7 +3836,7 @@ void RasterizerSceneGLES3::_render_buffers_debug_draw(Ref<RenderSceneBuffersGLES
38323836 glActiveTexture (GL_TEXTURE0);
38333837 scene_state.enable_gl_depth_draw (true );
38343838 glDepthFunc (GL_ALWAYS);
3835- scene_state.set_gl_cull_mode (GLES3::SceneShaderData::CULL_DISABLED );
3839+ scene_state.set_gl_cull_mode (RS::CULL_MODE_DISABLED );
38363840
38373841 // Loop through quadrants and copy shadows over.
38383842 for (int quadrant = 0 ; quadrant < 4 ; quadrant++) {
0 commit comments