[gd_scene load_steps=5 format=2] [sub_resource type="SphereMesh" id=1] custom_aabb = AABB( 0, 0, 0, 0, 0, 0 ) radius = 1.0 height = 2.0 radial_segments = 64 rings = 32 is_hemisphere = false [sub_resource type="Shader" id=2] code = "shader_type spatial; render_mode blend_mix,depth_draw_opaque,cull_back,diffuse_burley,specular_schlick_ggx; uniform vec4 albedo : hint_color; uniform sampler2D texture_albedo : hint_albedo; uniform float specular; uniform float metallic; uniform float roughness : hint_range(0,1); uniform float point_size : hint_range(0,128); uniform sampler2D texture_metallic : hint_white; uniform vec4 metallic_texture_channel; uniform sampler2D texture_roughness : hint_white; uniform vec4 roughness_texture_channel; uniform vec3 uv1_scale; uniform vec3 uv1_offset; uniform vec3 uv2_scale; uniform vec3 uv2_offset; void vertex() { UV=UV*uv1_scale.xy+uv1_offset.xy; } void fragment() { vec2 base_uv = UV; vec4 albedo_tex = texture(texture_albedo,base_uv); ALBEDO = albedo.rgb * albedo_tex.rgb; float metallic_tex = dot(texture(texture_metallic,base_uv),metallic_texture_channel); METALLIC = metallic_tex * metallic; float roughness_tex = dot(texture(texture_roughness,base_uv),roughness_texture_channel); ROUGHNESS = roughness_tex * roughness; SPECULAR = specular; } " _sections_unfolded = [ "Resource" ] [sub_resource type="ShaderMaterial" id=3] render_priority = 0 shader = SubResource( 2 ) shader_param/albedo = Color( 0.513085, 0.250778, 0.675781, 1 ) shader_param/specular = 1.0 shader_param/metallic = 1.0 shader_param/roughness = 0.5 shader_param/point_size = 0.0 shader_param/metallic_texture_channel = null shader_param/roughness_texture_channel = null shader_param/uv1_scale = null shader_param/uv1_offset = null shader_param/uv2_scale = null shader_param/uv2_offset = null _sections_unfolded = [ "shader_param" ] [sub_resource type="ConvexPolygonShape" id=4] points = PoolVector3Array( -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, -1 ) [node name="CubeShaderTest" type="RigidBody"] input_ray_pickable = true input_capture_on_drag = false collision_layer = 1 collision_mask = 1 mode = 0 mass = 1.0 friction = 1.0 bounce = 0.0 gravity_scale = 1.0 custom_integrator = false continuous_cd = false contacts_reported = 0 contact_monitor = false sleeping = false can_sleep = true axis_lock_linear_x = false axis_lock_linear_y = false axis_lock_linear_z = false axis_lock_angular_x = false axis_lock_angular_y = false axis_lock_angular_z = false linear_velocity = Vector3( 0, 0, 0 ) linear_damp = -1.0 angular_velocity = Vector3( 0, 0, 0 ) angular_damp = -1.0 [node name="MeshInstance" type="MeshInstance" parent="." index="0"] layers = 1 material_override = null cast_shadow = 1 extra_cull_margin = 0.0 use_in_baked_light = false lod_min_distance = 0.0 lod_min_hysteresis = 0.0 lod_max_distance = 0.0 lod_max_hysteresis = 0.0 mesh = SubResource( 1 ) skeleton = NodePath("..") material/0 = SubResource( 3 ) _sections_unfolded = [ "material" ] [node name="CollisionShape" type="CollisionShape" parent="." index="1"] shape = SubResource( 4 ) disabled = false