Initial Commit
This commit is contained in:
commit
cf76e5c9b2
43 changed files with 1779 additions and 0 deletions
23
shaders/map.gdshader
Normal file
23
shaders/map.gdshader
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
shader_type canvas_item;
|
||||
|
||||
uniform int mode = 1;
|
||||
uniform sampler2D gradient;
|
||||
void vertex() {
|
||||
// Called for every vertex the material is visible on.
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
if (mode == 1) {
|
||||
COLOR = COLOR;
|
||||
}
|
||||
if (mode == 2)
|
||||
{
|
||||
vec4 ree = texture(gradient, vec2(COLOR.r));
|
||||
COLOR = ree;
|
||||
}
|
||||
}
|
||||
|
||||
//void light() {
|
||||
// // Called for every pixel for every light affecting the material.
|
||||
// // Uncomment to replace the default light processing function with this one.
|
||||
//}
|
||||
1
shaders/map.gdshader.uid
Normal file
1
shaders/map.gdshader.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://b5n8mkb7vo6of
|
||||
12
shaders/map.tres
Normal file
12
shaders/map.tres
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[gd_resource type="ShaderMaterial" format=3 uid="uid://k3teblrpopsb"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://b5n8mkb7vo6of" path="res://shaders/map.gdshader" id="1_l44ik"]
|
||||
[ext_resource type="Gradient" uid="uid://b5l44rktieewe" path="res://resources/planet_gradient.tres" id="2_1qhyp"]
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_e6qn0"]
|
||||
gradient = ExtResource("2_1qhyp")
|
||||
|
||||
[resource]
|
||||
shader = ExtResource("1_l44ik")
|
||||
shader_parameter/mode = 1
|
||||
shader_parameter/gradient = SubResource("GradientTexture1D_e6qn0")
|
||||
32
shaders/planet.gdshader
Normal file
32
shaders/planet.gdshader
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
shader_type spatial;
|
||||
render_mode unshaded;
|
||||
|
||||
uniform int mode = 1;
|
||||
uniform sampler2D gradient;
|
||||
varying vec3 world_position;
|
||||
varying flat float color;
|
||||
void vertex() {
|
||||
// Called for every vertex the material is visible on.
|
||||
world_position = VERTEX;
|
||||
color = COLOR.r;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
// Called for every pixel the material is visible on.
|
||||
float temp = sin((world_position.y-95.0) / 60.0);
|
||||
|
||||
temp = clamp(temp, 0.0, 1)*28.0;
|
||||
if (mode == 1) {
|
||||
ALBEDO = vec3(COLOR.r, COLOR.g, COLOR.b);
|
||||
}
|
||||
if (mode == 2)
|
||||
{
|
||||
vec4 ree = texture(gradient, vec2(color));
|
||||
ALBEDO = vec3(ree.x, ree.y, ree.z);
|
||||
}
|
||||
}
|
||||
|
||||
//void light() {
|
||||
// // Called for every pixel for every light affecting the material.
|
||||
// // Uncomment to replace the default light processing function with this one.
|
||||
//}
|
||||
1
shaders/planet.gdshader.uid
Normal file
1
shaders/planet.gdshader.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bi1msxvmhvcqf
|
||||
13
shaders/planet.tres
Normal file
13
shaders/planet.tres
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
[gd_resource type="ShaderMaterial" format=3 uid="uid://c55st036tapeo"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://bi1msxvmhvcqf" path="res://shaders/planet.gdshader" id="1_p4gwj"]
|
||||
[ext_resource type="Gradient" uid="uid://b5l44rktieewe" path="res://resources/planet_gradient.tres" id="2_tjikr"]
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_5ojgt"]
|
||||
gradient = ExtResource("2_tjikr")
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_p4gwj")
|
||||
shader_parameter/mode = 1
|
||||
shader_parameter/gradient = SubResource("GradientTexture1D_5ojgt")
|
||||
Loading…
Add table
Add a link
Reference in a new issue