Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make 3D editor gizmos and debug shapes ignore fog #82413

Merged
merged 1 commit into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions editor/import/scene_import_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1556,6 +1556,7 @@ SceneImportSettings::SceneImportSettings() {
Ref<StandardMaterial3D> selection_mat;
selection_mat.instantiate();
selection_mat->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
selection_mat->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
selection_mat->set_albedo(Color(1, 0.8, 1.0));

Ref<SurfaceTool> st;
Expand Down Expand Up @@ -1597,6 +1598,7 @@ SceneImportSettings::SceneImportSettings() {
{
collider_mat.instantiate();
collider_mat->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
collider_mat->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
collider_mat->set_albedo(Color(0.5, 0.5, 1.0));
}

Expand Down
1 change: 1 addition & 0 deletions editor/plugins/gizmos/lightmap_gi_gizmo_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ LightmapGIGizmoPlugin::LightmapGIGizmoPlugin() {
mat->set_cull_mode(StandardMaterial3D::CULL_DISABLED);
mat->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
mat->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, false);
mat->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);

add_material("lightmap_probe_material", mat);

Expand Down
1 change: 1 addition & 0 deletions editor/plugins/gizmos/marker_3d_gizmo_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Marker3DGizmoPlugin::Marker3DGizmoPlugin() {
mat->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
mat->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
mat->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
mat->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
mat->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);

Array d;
Expand Down
2 changes: 2 additions & 0 deletions editor/plugins/navigation_obstacle_3d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ NavigationObstacle3DEditor::NavigationObstacle3DEditor() {
line_material->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
line_material->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
line_material->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
line_material->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
line_material->set_albedo(Color(1, 1, 1));

handle_material = Ref<StandardMaterial3D>(memnew(StandardMaterial3D));
Expand All @@ -554,6 +555,7 @@ NavigationObstacle3DEditor::NavigationObstacle3DEditor() {
handle_material->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
handle_material->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
handle_material->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
handle_material->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
Ref<Texture2D> handle = EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Editor3DHandle"), EditorStringName(EditorIcons));
handle_material->set_point_size(handle->get_width());
handle_material->set_texture(StandardMaterial3D::TEXTURE_ALBEDO, handle);
Expand Down
3 changes: 3 additions & 0 deletions editor/plugins/node_3d_editor_gizmos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,7 @@ void EditorNode3DGizmoPlugin::create_material(const String &p_name, const Color
material->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
material->set_render_priority(StandardMaterial3D::RENDER_PRIORITY_MIN + 1);
material->set_cull_mode(StandardMaterial3D::CULL_DISABLED);
material->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);

if (p_use_vertex_color) {
material->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
Expand Down Expand Up @@ -918,6 +919,7 @@ void EditorNode3DGizmoPlugin::create_icon_material(const String &p_name, const R
icon->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
icon->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
icon->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
icon->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
icon->set_cull_mode(StandardMaterial3D::CULL_DISABLED);
icon->set_depth_draw_mode(StandardMaterial3D::DEPTH_DRAW_DISABLED);
icon->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
Expand Down Expand Up @@ -947,6 +949,7 @@ void EditorNode3DGizmoPlugin::create_handle_material(const String &p_name, bool
handle_material->set_albedo(Color(1, 1, 1));
handle_material->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
handle_material->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
handle_material->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
handle_material->set_on_top_of_alpha();
if (p_billboard) {
handle_material->set_billboard_mode(StandardMaterial3D::BILLBOARD_ENABLED);
Expand Down
26 changes: 16 additions & 10 deletions editor/plugins/node_3d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5832,6 +5832,7 @@ void Node3DEditor::_generate_selection_boxes() {

Ref<StandardMaterial3D> mat = memnew(StandardMaterial3D);
mat->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
mat->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
const Color selection_box_color = EDITOR_GET("editors/3d/selection_box_color");
mat->set_albedo(selection_box_color);
mat->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
Expand All @@ -5840,6 +5841,7 @@ void Node3DEditor::_generate_selection_boxes() {

Ref<StandardMaterial3D> mat_xray = memnew(StandardMaterial3D);
mat_xray->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
mat_xray->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
mat_xray->set_flag(StandardMaterial3D::FLAG_DISABLE_DEPTH_TEST, true);
mat_xray->set_albedo(selection_box_color * Color(1, 1, 1, 0.15));
mat_xray->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
Expand Down Expand Up @@ -6484,6 +6486,7 @@ void Node3DEditor::_init_indicators() {
indicator_mat->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
indicator_mat->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
indicator_mat->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
indicator_mat->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
indicator_mat->set_transparency(StandardMaterial3D::Transparency::TRANSPARENCY_ALPHA_DEPTH_PRE_PASS);

Vector<Color> origin_colors;
Expand Down Expand Up @@ -6541,7 +6544,7 @@ void Node3DEditor::_init_indicators() {

shader_type spatial;

render_mode unshaded;
render_mode unshaded, fog_disabled;

uniform bool orthogonal;
uniform float grid_size;
Expand Down Expand Up @@ -6638,6 +6641,7 @@ void fragment() {

Ref<StandardMaterial3D> mat = memnew(StandardMaterial3D);
mat->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
mat->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
mat->set_on_top_of_alpha();
mat->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
mat->set_albedo(col);
Expand Down Expand Up @@ -6722,6 +6726,7 @@ void fragment() {

Ref<StandardMaterial3D> plane_mat = memnew(StandardMaterial3D);
plane_mat->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
plane_mat->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
plane_mat->set_on_top_of_alpha();
plane_mat->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
plane_mat->set_cull_mode(StandardMaterial3D::CULL_DISABLED);
Expand Down Expand Up @@ -6782,22 +6787,22 @@ void fragment() {

shader_type spatial;

render_mode unshaded, depth_test_disabled;
render_mode unshaded, depth_test_disabled, fog_disabled;

uniform vec4 albedo;

mat3 orthonormalize(mat3 m) {
vec3 x = normalize(m[0]);
vec3 y = normalize(m[1] - x * dot(x, m[1]));
vec3 z = m[2] - x * dot(x, m[2]);
z = normalize(z - y * (dot(y,m[2])));
z = normalize(z - y * (dot(y, m[2])));
return mat3(x,y,z);
}

void vertex() {
mat3 mv = orthonormalize(mat3(MODELVIEW_MATRIX));
vec3 n = mv * VERTEX;
float orientation = dot(vec3(0, 0, -1), n);
float orientation = dot(vec3(0.0, 0.0, -1.0), n);
if (orientation <= 0.005) {
VERTEX += NORMAL * 0.02;
}
Expand Down Expand Up @@ -6832,24 +6837,24 @@ void fragment() {

shader_type spatial;

render_mode unshaded, depth_test_disabled;
render_mode unshaded, depth_test_disabled, fog_disabled;

uniform vec4 albedo;

mat3 orthonormalize(mat3 m) {
vec3 x = normalize(m[0]);
vec3 y = normalize(m[1] - x * dot(x, m[1]));
vec3 z = m[2] - x * dot(x, m[2]);
z = normalize(z - y * (dot(y,m[2])));
return mat3(x,y,z);
z = normalize(z - y * (dot(y, m[2])));
return mat3(x, y, z);
}

void vertex() {
mat3 mv = orthonormalize(mat3(MODELVIEW_MATRIX));
mv = inverse(mv);
VERTEX += NORMAL*0.008;
vec3 camera_dir_local = mv * vec3(0,0,1);
vec3 camera_up_local = mv * vec3(0,1,0);
VERTEX += NORMAL * 0.008;
vec3 camera_dir_local = mv * vec3(0.0, 0.0, 1.0);
vec3 camera_up_local = mv * vec3(0.0, 1.0, 0.0);
mat3 rotation_matrix = mat3(cross(camera_dir_local, camera_up_local), camera_up_local, camera_dir_local);
VERTEX = rotation_matrix * VERTEX;
}
Expand Down Expand Up @@ -6944,6 +6949,7 @@ void fragment() {

Ref<StandardMaterial3D> plane_mat = memnew(StandardMaterial3D);
plane_mat->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
plane_mat->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
plane_mat->set_on_top_of_alpha();
plane_mat->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
plane_mat->set_cull_mode(StandardMaterial3D::CULL_DISABLED);
Expand Down
2 changes: 2 additions & 0 deletions editor/plugins/polygon_3d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ Polygon3DEditor::Polygon3DEditor() {
line_material->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
line_material->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
line_material->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
line_material->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
line_material->set_albedo(Color(1, 1, 1));

handle_material = Ref<StandardMaterial3D>(memnew(StandardMaterial3D));
Expand All @@ -569,6 +570,7 @@ Polygon3DEditor::Polygon3DEditor() {
handle_material->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
handle_material->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
handle_material->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
handle_material->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
Ref<Texture2D> handle = EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Editor3DHandle"), EditorStringName(EditorIcons));
handle_material->set_point_size(handle->get_width());
handle_material->set_texture(StandardMaterial3D::TEXTURE_ALBEDO, handle);
Expand Down
23 changes: 16 additions & 7 deletions editor/plugins/skeleton_3d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -916,24 +916,32 @@ Skeleton3DEditor::Skeleton3DEditor(EditorInspectorPluginSkeleton *e_plugin, Skel
// Skeleton 3D gizmo handle shader.
shader_type spatial;
render_mode unshaded, shadows_disabled, depth_draw_always;
render_mode unshaded, shadows_disabled, depth_draw_always, fog_disabled;
uniform sampler2D texture_albedo : source_color;
uniform float point_size : hint_range(0,128) = 32;
uniform float point_size : hint_range(0, 128) = 32;
void vertex() {
if (!OUTPUT_IS_SRGB) {
COLOR.rgb = mix( pow((COLOR.rgb + vec3(0.055)) * (1.0 / (1.0 + 0.055)), vec3(2.4)), COLOR.rgb* (1.0 / 12.92), lessThan(COLOR.rgb,vec3(0.04045)) );
COLOR.rgb = mix(pow((COLOR.rgb + vec3(0.055)) * (1.0 / (1.0 + 0.055)), vec3(2.4)), COLOR.rgb * (1.0 / 12.92), lessThan(COLOR.rgb, vec3(0.04045)));
}
VERTEX = VERTEX;
POSITION = PROJECTION_MATRIX * VIEW_MATRIX * MODEL_MATRIX * vec4(VERTEX.xyz, 1.0);
POSITION.z = mix(POSITION.z, 0, 0.999);
POSITION.z = mix(POSITION.z, 0.0, 0.999);
POINT_SIZE = point_size;
}
void fragment() {
vec4 albedo_tex = texture(texture_albedo,POINT_COORD);
vec4 albedo_tex = texture(texture_albedo, POINT_COORD);
vec3 col = albedo_tex.rgb + COLOR.rgb;
col = vec3(min(col.r,1.0),min(col.g,1.0),min(col.b,1.0));
col = vec3(min(col.r, 1.0), min(col.g, 1.0), min(col.b, 1.0));
ALBEDO = col;
if (albedo_tex.a < 0.5) { discard; }
if (albedo_tex.a < 0.5) {
discard;
}
ALPHA = albedo_tex.a;
}
)");
Expand Down Expand Up @@ -1184,6 +1192,7 @@ Skeleton3DGizmoPlugin::Skeleton3DGizmoPlugin() {
unselected_mat->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
unselected_mat->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
unselected_mat->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
unselected_mat->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);

selected_mat = Ref<ShaderMaterial>(memnew(ShaderMaterial));
selected_sh = Ref<Shader>(memnew(Shader));
Expand Down
4 changes: 4 additions & 0 deletions modules/gridmap/editor/grid_map_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,7 @@ GridMapEditor::GridMapEditor() {
inner_mat.instantiate();
inner_mat->set_albedo(Color(0.7, 0.7, 1.0, 0.2));
inner_mat->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
inner_mat->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
inner_mat->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);

d[RS::ARRAY_VERTEX] = triangles;
Expand All @@ -1424,11 +1425,13 @@ GridMapEditor::GridMapEditor() {

outer_mat->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
outer_mat->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
outer_mat->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);

selection_floor_mat.instantiate();
selection_floor_mat->set_albedo(Color(0.80, 0.80, 1.0, 1));
selection_floor_mat->set_on_top_of_alpha();
selection_floor_mat->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
selection_floor_mat->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);

d[RS::ARRAY_VERTEX] = lines;
RenderingServer::get_singleton()->mesh_add_surface_from_arrays(selection_mesh, RS::PRIMITIVE_LINES, d);
Expand Down Expand Up @@ -1457,6 +1460,7 @@ GridMapEditor::GridMapEditor() {
indicator_mat->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
indicator_mat->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
indicator_mat->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
indicator_mat->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
indicator_mat->set_albedo(Color(0.8, 0.5, 0.1));
}

Expand Down
1 change: 1 addition & 0 deletions scene/3d/mesh_instance_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ MeshInstance3D *MeshInstance3D::create_debug_tangents_node() {
sm->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
sm->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
sm->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
sm->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);

Ref<ArrayMesh> am;
am.instantiate();
Expand Down
1 change: 1 addition & 0 deletions scene/3d/ray_cast_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ void RayCast3D::_update_debug_shape_material(bool p_check_collision) {
debug_material = material;

material->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
material->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
// Use double-sided rendering so that the RayCast can be seen if the camera is inside.
material->set_cull_mode(BaseMaterial3D::CULL_DISABLED);
material->set_transparency(BaseMaterial3D::TRANSPARENCY_ALPHA);
Expand Down
1 change: 1 addition & 0 deletions scene/3d/shape_cast_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ void ShapeCast3D::_update_debug_shape_material(bool p_check_collision) {
debug_material = material;

material->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
material->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
// Use double-sided rendering so that the RayCast can be seen if the camera is inside.
material->set_cull_mode(BaseMaterial3D::CULL_DISABLED);
material->set_transparency(BaseMaterial3D::TRANSPARENCY_ALPHA);
Expand Down
1 change: 1 addition & 0 deletions scene/3d/voxelizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -990,6 +990,7 @@ Ref<MultiMesh> Voxelizer::create_debug_multimesh() {
fsm->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
fsm->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
fsm->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
fsm->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
fsm->set_albedo(Color(1, 1, 1, 1));

mesh->surface_set_material(0, fsm);
Expand Down
3 changes: 3 additions & 0 deletions scene/main/scene_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,7 @@ Ref<Material> SceneTree::get_debug_paths_material() {
_debug_material->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
_debug_material->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
_debug_material->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
_debug_material->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
_debug_material->set_albedo(get_debug_paths_color());

debug_paths_material = _debug_material;
Expand All @@ -808,6 +809,7 @@ Ref<Material> SceneTree::get_debug_collision_material() {
line_material->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
line_material->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
line_material->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
line_material->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
line_material->set_albedo(get_debug_collisions_color());

collision_material = line_material;
Expand All @@ -829,6 +831,7 @@ Ref<ArrayMesh> SceneTree::get_debug_contact_mesh() {
mat->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
mat->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
mat->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
mat->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
mat->set_albedo(get_debug_collision_contact_color());

Vector3 diamond[6] = {
Expand Down
Loading