summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-11-18 09:23:54 -0600
committerThaddeus Crews <repiteo@outlook.com>2024-11-18 09:23:54 -0600
commitfd4c29a189e53a1e085df5b9b9a05cac9351b3ef (patch)
tree433e06f1cbaf5282e304f0dc5a661225b4edf7fe /drivers
parentcf541f09975ace1f31cacf9d2818e43c1ea7d65d (diff)
parent90b4b48b5a9ea1c8b29654576480d9ab672b48b3 (diff)
downloadredot-engine-fd4c29a189e53a1e085df5b9b9a05cac9351b3ef.tar.gz
Merge pull request #98683 from clayjohn/wireframe
Ensure shadow material and mesh are not used with wireframe mode
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index 537076d4ed..dfc7d02ac0 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -238,7 +238,7 @@ void RasterizerSceneGLES3::_geometry_instance_add_surface_with_material(Geometry
GLES3::SceneMaterialData *material_shadow = nullptr;
void *surface_shadow = nullptr;
- if (!p_material->shader_data->uses_particle_trails && !p_material->shader_data->writes_modelview_or_projection && !p_material->shader_data->uses_vertex && !p_material->shader_data->uses_discard && !p_material->shader_data->uses_depth_prepass_alpha && !p_material->shader_data->uses_alpha_clip && !p_material->shader_data->uses_world_coordinates) {
+ if (!p_material->shader_data->uses_particle_trails && !p_material->shader_data->writes_modelview_or_projection && !p_material->shader_data->uses_vertex && !p_material->shader_data->uses_discard && !p_material->shader_data->uses_depth_prepass_alpha && !p_material->shader_data->uses_alpha_clip && !p_material->shader_data->uses_world_coordinates && !p_material->shader_data->wireframe) {
flags |= GeometryInstanceSurface::FLAG_USES_SHARED_SHADOW_MATERIAL;
material_shadow = static_cast<GLES3::SceneMaterialData *>(GLES3::MaterialStorage::get_singleton()->material_get_data(scene_globals.default_material, RS::SHADER_SPATIAL));
@@ -3157,7 +3157,7 @@ void RasterizerSceneGLES3::_render_list_template(RenderListParameters *p_params,
}
bool use_wireframe = false;
- if (p_params->force_wireframe) {
+ if (p_params->force_wireframe || shader->wireframe) {
GLuint wireframe_index_array_gl = mesh_storage->mesh_surface_get_index_buffer_wireframe(mesh_surface);
if (wireframe_index_array_gl) {
index_array_gl = wireframe_index_array_gl;