reversed tubes on the hub, other hub world tweaks
This commit is contained in:
18
assets/materials/FrostedGlass.tres
Normal file
18
assets/materials/FrostedGlass.tres
Normal file
@@ -0,0 +1,18 @@
|
||||
[gd_resource type="ShaderMaterial" load_steps=5 format=3 uid="uid://bb0beroi2p3gd"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://igy6srcqsvi8" path="res://assets/materials/frostedGlass.gdshader" id="1_thve0"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_thve0"]
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_748hl"]
|
||||
|
||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_0bs8y"]
|
||||
color_ramp = SubResource("Gradient_thve0")
|
||||
noise = SubResource("FastNoiseLite_748hl")
|
||||
|
||||
[resource]
|
||||
shader = ExtResource("1_thve0")
|
||||
shader_parameter/warp_texture = SubResource("NoiseTexture2D_0bs8y")
|
||||
shader_parameter/intensity = 0.01
|
||||
shader_parameter/tint_color = Color(0, 0, 0, 0)
|
||||
shader_parameter/tint_amount = 0.4
|
||||
29
assets/materials/frostedGlass.gdshader
Normal file
29
assets/materials/frostedGlass.gdshader
Normal file
@@ -0,0 +1,29 @@
|
||||
shader_type canvas_item;
|
||||
|
||||
// mipmap is neaded for textureLod
|
||||
uniform sampler2D screen_texture: hint_screen_texture, repeat_disable, filter_nearest_mipmap;
|
||||
// works better as a normal with warping
|
||||
uniform sampler2D warp_texture: repeat_enable;
|
||||
|
||||
uniform float intensity: hint_range(0.0, 0.3) = 0.01;
|
||||
uniform vec4 tint_color: source_color = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
uniform float tint_amount: hint_range(0.0, 1.0) = 0.4;
|
||||
|
||||
void fragment() {
|
||||
// get our normal warp
|
||||
vec2 warp = texture(warp_texture, UV).xy - 0.5;
|
||||
// sample based on warp and intensity and blur based on intensity
|
||||
vec4 screen = textureLod(screen_texture, UV + warp * intensity, intensity * 4.0);
|
||||
// tint our image
|
||||
screen = mix(screen, tint_color, tint_amount);
|
||||
// get a random-ish value for some speckle noise
|
||||
float noise = fract(sin(dot(UV, vec2(12.9898, 78.233))) * 43758.5453);
|
||||
// light diffusion for glass shape highlights
|
||||
float diff = max(dot(warp, normalize(vec2(1.0, 1.0))), 0.0);
|
||||
// apply diffusion based on intensity
|
||||
screen += diff * intensity;
|
||||
// apply speckle noise based on intensity
|
||||
screen += noise * intensity;
|
||||
// yarp
|
||||
COLOR = screen;
|
||||
}
|
||||
1
assets/materials/frostedGlass.gdshader.uid
Normal file
1
assets/materials/frostedGlass.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://igy6srcqsvi8
|
||||
@@ -1,11 +1,39 @@
|
||||
[gd_resource type="StandardMaterial3D" format=3 uid="uid://hg5phpsguoh5"]
|
||||
[gd_resource type="StandardMaterial3D" load_steps=7 format=3 uid="uid://hg5phpsguoh5"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_wmskm"]
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_cprqi"]
|
||||
noise_type = 2
|
||||
|
||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_twkyn"]
|
||||
width = 1024
|
||||
height = 1024
|
||||
as_normal_map = true
|
||||
color_ramp = SubResource("Gradient_wmskm")
|
||||
noise = SubResource("FastNoiseLite_cprqi")
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_vbylo"]
|
||||
offsets = PackedFloat32Array(0.42069, 0.993103, 1)
|
||||
colors = PackedColorArray(0, 0, 0, 1, 0.926175, 0.926175, 0.926175, 1, 1, 1, 1, 1)
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_wmskm"]
|
||||
|
||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_cprqi"]
|
||||
width = 1024
|
||||
height = 1024
|
||||
seamless = true
|
||||
color_ramp = SubResource("Gradient_vbylo")
|
||||
noise = SubResource("FastNoiseLite_wmskm")
|
||||
|
||||
[resource]
|
||||
transparency = 1
|
||||
cull_mode = 2
|
||||
albedo_color = Color(0.6364, 0.763107, 0.86, 0.352941)
|
||||
albedo_color = Color(0.1782, 0.55728, 0.81, 0.568627)
|
||||
metallic = 1.0
|
||||
roughness = 0.0
|
||||
backlight_enabled = true
|
||||
metallic_specular = 1.0
|
||||
roughness_texture = SubResource("NoiseTexture2D_cprqi")
|
||||
normal_enabled = true
|
||||
normal_scale = 0.1
|
||||
normal_texture = SubResource("NoiseTexture2D_twkyn")
|
||||
backlight = Color(1, 1, 1, 1)
|
||||
refraction_enabled = true
|
||||
uv1_scale = Vector3(0.08, 0.08, 0.08)
|
||||
uv1_triplanar = true
|
||||
|
||||
Reference in New Issue
Block a user