-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathgalaxymesh.tres
More file actions
42 lines (35 loc) · 1.03 KB
/
galaxymesh.tres
File metadata and controls
42 lines (35 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
[gd_resource type="Shader" format=2]
[resource]
code = "// NOTE: Shader automatically converted from Godot Engine 3.5.3.stable's SpatialMaterial.
shader_type spatial;
render_mode async_hidden,blend_add,depth_draw_opaque,cull_back,diffuse_burley,specular_schlick_ggx,unshaded;
uniform vec4 albedo : hint_color;
uniform sampler2D texture_albedo : hint_albedo;
uniform float speed = 1.0;
uniform float specular;
uniform float metallic;
uniform float roughness : hint_range(0,1);
uniform float point_size : hint_range(0,128);
uniform vec3 uv1_scale;
uniform vec3 uv1_offset;
uniform vec3 uv2_scale;
uniform vec3 uv2_offset;
vec2 rotate2D(vec2 v, float a) {
float s = sin(a);
float c = cos(a);
mat2 m = mat2(vec2(c,-s),vec2(s,c));
return m * v;
}
void vertex() {
UV=UV*uv1_scale.xy+uv1_offset.xy;
VERTEX.xz = rotate2D(VERTEX.xz,TIME * speed);
}
void fragment() {
vec2 base_uv = UV;
vec4 albedo_tex = texture(texture_albedo,base_uv);
ALBEDO = albedo.rgb * albedo_tex.rgb;
METALLIC = metallic;
ROUGHNESS = roughness;
SPECULAR = specular;
}
"