From abf2332af1aaa676c31d5c3db00c3f83a69fd56f Mon Sep 17 00:00:00 2001 From: ywmaa Date: Wed, 3 Jan 2024 17:57:39 +0200 Subject: [PATCH] Add check for force_vertex_shading in the material --- drivers/gles3/storage/material_storage.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp index da99409bcb3c..1e9b0fa43169 100644 --- a/drivers/gles3/storage/material_storage.cpp +++ b/drivers/gles3/storage/material_storage.cpp @@ -2925,6 +2925,10 @@ void SceneShaderData::set_code(const String &p_code) { actions.render_mode_flags["unshaded"] = &unshaded; actions.render_mode_flags["vertex_lighting"] = &vertex_lighting; + bool force_vertex_lighting = GLOBAL_GET("rendering/shading/overrides/force_vertex_shading"); + if (force_vertex_lighting) { + actions.render_mode_flags["vertex_lighting"] = true; + } actions.render_mode_flags["wireframe"] = &wireframe; actions.render_mode_flags["particle_trails"] = &uses_particle_trails; actions.render_mode_flags["world_vertex_coords"] = &uses_world_coordinates;