Make the preview material double-sided for better visibility

This makes the material still render if the camera "enters"
the preview mesh. This can reduce disorientation when moving
the camera around.
This commit is contained in:
Hugo Locurcio 2019-10-20 19:30:51 +02:00
parent 80f8071d7b
commit a249ebb5f4
No known key found for this signature in database
GPG Key ID: 39E8F8BE30B0A49C

View File

@ -132,6 +132,10 @@ func get_generated_texture(slot, file_prefix = null):
func update_spatial_material(m, file_prefix = null):
var texture
# Make the material double-sided for better visiblity in the preview
m.params_cull_mode = SpatialMaterial.CULL_DISABLED
m.albedo_color = parameters.albedo_color
m.albedo_texture = get_generated_texture("albedo", file_prefix)
m.metallic = parameters.metallic