You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-18 14:21:41 +00:00
add ORMSpatialMaterial
This commit is contained in:
@@ -878,7 +878,7 @@ void SpaceBullet::update_gravity() {
|
||||
|
||||
static ImmediateGeometry *motionVec(NULL);
|
||||
static ImmediateGeometry *normalLine(NULL);
|
||||
static Ref<SpatialMaterial> red_mat;
|
||||
static Ref<Material3D> red_mat;
|
||||
static Ref<SpatialMaterial> blue_mat;
|
||||
#endif
|
||||
|
||||
@@ -895,21 +895,21 @@ bool SpaceBullet::test_body_motion(RigidBodyBullet *p_body, const Transform &p_f
|
||||
motionVec->set_as_toplevel(true);
|
||||
normalLine->set_as_toplevel(true);
|
||||
|
||||
red_mat = Ref<SpatialMaterial>(memnew(SpatialMaterial));
|
||||
red_mat->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
|
||||
red_mat = Ref<Material3D>(memnew(SpatialMaterial));
|
||||
red_mat->set_flag(Material3D::FLAG_UNSHADED, true);
|
||||
red_mat->set_line_width(20.0);
|
||||
red_mat->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
|
||||
red_mat->set_flag(SpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
|
||||
red_mat->set_flag(SpatialMaterial::FLAG_SRGB_VERTEX_COLOR, true);
|
||||
red_mat->set_feature(Material3D::FEATURE_TRANSPARENT, true);
|
||||
red_mat->set_flag(Material3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
|
||||
red_mat->set_flag(Material3D::FLAG_SRGB_VERTEX_COLOR, true);
|
||||
red_mat->set_albedo(Color(1, 0, 0, 1));
|
||||
motionVec->set_material_override(red_mat);
|
||||
|
||||
blue_mat = Ref<SpatialMaterial>(memnew(SpatialMaterial));
|
||||
blue_mat->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
|
||||
blue_mat = Ref<Material3D>(memnew(SpatialMaterial));
|
||||
blue_mat->set_flag(Material3D::FLAG_UNSHADED, true);
|
||||
blue_mat->set_line_width(20.0);
|
||||
blue_mat->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
|
||||
blue_mat->set_flag(SpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
|
||||
blue_mat->set_flag(SpatialMaterial::FLAG_SRGB_VERTEX_COLOR, true);
|
||||
blue_mat->set_feature(Material3D::FEATURE_TRANSPARENT, true);
|
||||
blue_mat->set_flag(Material3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
|
||||
blue_mat->set_flag(Material3D::FLAG_SRGB_VERTEX_COLOR, true);
|
||||
blue_mat->set_albedo(Color(0, 0, 1, 1));
|
||||
normalLine->set_material_override(blue_mat);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user