some small grass and shader test
This commit is contained in:
4
.editorconfig
Normal file
4
.editorconfig
Normal file
@@ -0,0 +1,4 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# Normalize EOL for all files that Git considers text files.
|
||||
* text=auto eol=lf
|
||||
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# Godot 4+ specific ignores
|
||||
.godot/
|
||||
/android/
|
||||
BIN
grass/High/High Grass.c4d
Normal file
BIN
grass/High/High Grass.c4d
Normal file
Binary file not shown.
BIN
grass/High/High Grass.fbx
Normal file
BIN
grass/High/High Grass.fbx
Normal file
Binary file not shown.
44
grass/High/High Grass.fbx.import
Normal file
44
grass/High/High Grass.fbx.import
Normal file
@@ -0,0 +1,44 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://bvq7n1s5iasky"
|
||||
path="res://.godot/imported/High Grass.fbx-3c8a6fd67d562bd1df777a9008a5f9a8.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://grass/High/High Grass.fbx"
|
||||
dest_files=["res://.godot/imported/High Grass.fbx-3c8a6fd67d562bd1df777a9008a5f9a8.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=true
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={}
|
||||
fbx/importer=0
|
||||
fbx/allow_geometry_helper_nodes=false
|
||||
fbx/embedded_image_handling=1
|
||||
fbx/naming_version=2
|
||||
8336
grass/High/High Grass.obj
Normal file
8336
grass/High/High Grass.obj
Normal file
File diff suppressed because it is too large
Load Diff
25
grass/High/High Grass.obj.import
Normal file
25
grass/High/High Grass.obj.import
Normal file
@@ -0,0 +1,25 @@
|
||||
[remap]
|
||||
|
||||
importer="wavefront_obj"
|
||||
importer_version=1
|
||||
type="Mesh"
|
||||
uid="uid://3vena5emwf0c"
|
||||
path="res://.godot/imported/High Grass.obj-89e95bb964e3b3822f3d741785de1654.mesh"
|
||||
|
||||
[deps]
|
||||
|
||||
files=["res://.godot/imported/High Grass.obj-89e95bb964e3b3822f3d741785de1654.mesh"]
|
||||
|
||||
source_file="res://grass/High/High Grass.obj"
|
||||
dest_files=["res://.godot/imported/High Grass.obj-89e95bb964e3b3822f3d741785de1654.mesh", "res://.godot/imported/High Grass.obj-89e95bb964e3b3822f3d741785de1654.mesh"]
|
||||
|
||||
[params]
|
||||
|
||||
generate_tangents=true
|
||||
generate_lods=true
|
||||
generate_shadow_mesh=true
|
||||
generate_lightmap_uv2=false
|
||||
generate_lightmap_uv2_texel_size=0.2
|
||||
scale_mesh=Vector3(1, 1, 1)
|
||||
offset_mesh=Vector3(0, 0, 0)
|
||||
force_disable_mesh_compression=false
|
||||
BIN
grass/High/High quality.png
Normal file
BIN
grass/High/High quality.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 139 KiB |
40
grass/High/High quality.png.import
Normal file
40
grass/High/High quality.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b2067p8erljsx"
|
||||
path="res://.godot/imported/High quality.png-f2cbe3b2baa7c6630a6e8ab7aaec3266.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://grass/High/High quality.png"
|
||||
dest_files=["res://.godot/imported/High quality.png-f2cbe3b2baa7c6630a6e8ab7aaec3266.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
grass/Low/Low Grass.c4d
Normal file
BIN
grass/Low/Low Grass.c4d
Normal file
Binary file not shown.
BIN
grass/Low/Low Grass.fbx
Normal file
BIN
grass/Low/Low Grass.fbx
Normal file
Binary file not shown.
44
grass/Low/Low Grass.fbx.import
Normal file
44
grass/Low/Low Grass.fbx.import
Normal file
@@ -0,0 +1,44 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://bkesb12sqs1i0"
|
||||
path="res://.godot/imported/Low Grass.fbx-ab3061aea7152cd1e7988c7f9608b34a.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://grass/Low/Low Grass.fbx"
|
||||
dest_files=["res://.godot/imported/Low Grass.fbx-ab3061aea7152cd1e7988c7f9608b34a.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=true
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={}
|
||||
fbx/importer=0
|
||||
fbx/allow_geometry_helper_nodes=false
|
||||
fbx/embedded_image_handling=1
|
||||
fbx/naming_version=2
|
||||
2536
grass/Low/Low Grass.obj
Normal file
2536
grass/Low/Low Grass.obj
Normal file
File diff suppressed because it is too large
Load Diff
25
grass/Low/Low Grass.obj.import
Normal file
25
grass/Low/Low Grass.obj.import
Normal file
@@ -0,0 +1,25 @@
|
||||
[remap]
|
||||
|
||||
importer="wavefront_obj"
|
||||
importer_version=1
|
||||
type="Mesh"
|
||||
uid="uid://brk30gx7u0ikf"
|
||||
path="res://.godot/imported/Low Grass.obj-d0afb144fcbe555363ab892cce046a84.mesh"
|
||||
|
||||
[deps]
|
||||
|
||||
files=["res://.godot/imported/Low Grass.obj-d0afb144fcbe555363ab892cce046a84.mesh"]
|
||||
|
||||
source_file="res://grass/Low/Low Grass.obj"
|
||||
dest_files=["res://.godot/imported/Low Grass.obj-d0afb144fcbe555363ab892cce046a84.mesh", "res://.godot/imported/Low Grass.obj-d0afb144fcbe555363ab892cce046a84.mesh"]
|
||||
|
||||
[params]
|
||||
|
||||
generate_tangents=true
|
||||
generate_lods=true
|
||||
generate_shadow_mesh=true
|
||||
generate_lightmap_uv2=false
|
||||
generate_lightmap_uv2_texel_size=0.2
|
||||
scale_mesh=Vector3(1, 1, 1)
|
||||
offset_mesh=Vector3(0, 0, 0)
|
||||
force_disable_mesh_compression=false
|
||||
BIN
grass/Low/Low quality.png
Normal file
BIN
grass/Low/Low quality.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 119 KiB |
40
grass/Low/Low quality.png.import
Normal file
40
grass/Low/Low quality.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cnhth712dv3ia"
|
||||
path="res://.godot/imported/Low quality.png-843d16f764da2059ebbffc4e9ca4174c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://grass/Low/Low quality.png"
|
||||
dest_files=["res://.godot/imported/Low quality.png-843d16f764da2059ebbffc4e9ca4174c.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
grass/Low/Stem.fbx
Normal file
BIN
grass/Low/Stem.fbx
Normal file
Binary file not shown.
44
grass/Low/Stem.fbx.import
Normal file
44
grass/Low/Stem.fbx.import
Normal file
@@ -0,0 +1,44 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://dm7po7cjvio0r"
|
||||
path="res://.godot/imported/Stem.fbx-64e2d4783dcc9e77c21f9ebc51092610.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://grass/Low/Stem.fbx"
|
||||
dest_files=["res://.godot/imported/Stem.fbx-64e2d4783dcc9e77c21f9ebc51092610.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=true
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={}
|
||||
fbx/importer=0
|
||||
fbx/allow_geometry_helper_nodes=false
|
||||
fbx/embedded_image_handling=1
|
||||
fbx/naming_version=2
|
||||
BIN
grass/Tex/Grass.png
Normal file
BIN
grass/Tex/Grass.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 151 KiB |
40
grass/Tex/Grass.png.import
Normal file
40
grass/Tex/Grass.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c72mplm41yd06"
|
||||
path="res://.godot/imported/Grass.png-31e96299899b34c09c06a37ac0cd98de.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://grass/Tex/Grass.png"
|
||||
dest_files=["res://.godot/imported/Grass.png-31e96299899b34c09c06a37ac0cd98de.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
38
grass/grass.gdshader
Normal file
38
grass/grass.gdshader
Normal file
@@ -0,0 +1,38 @@
|
||||
shader_type spatial;
|
||||
render_mode cull_disabled;
|
||||
|
||||
uniform vec3 color: source_color;
|
||||
uniform vec3 shade: source_color;
|
||||
uniform sampler2D noise: source_color;
|
||||
uniform float noiseScale = 1.0;
|
||||
uniform float windSpeedScale = 1.0;
|
||||
uniform float windVertexOffsetScale = 1.0;
|
||||
|
||||
varying vec3 worldPos;
|
||||
varying vec3 instance_origin;
|
||||
|
||||
void vertex() {
|
||||
worldPos = (MODEL_MATRIX * vec4(VERTEX, 1.0)).xyz;
|
||||
instance_origin = MODELVIEW_MATRIX[3].xyz;
|
||||
|
||||
vec2 timeOffset = vec2(TIME/windSpeedScale);
|
||||
float noiseLevel = texture(noise, timeOffset + worldPos.xz/noiseScale).r;
|
||||
float vertexWindOffset = noiseLevel * worldPos.y * windVertexOffsetScale;
|
||||
VERTEX += vec3(1.0, 0.0, 1.0)*vertexWindOffset;
|
||||
// billboarding
|
||||
// MODELVIEW_MATRIX = VIEW_MATRIX * mat4(INV_VIEW_MATRIX[0],INV_VIEW_MATRIX[1],INV_VIEW_MATRIX[2],MODEL_MATRIX[3]);
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec2 timeOffset = vec2(TIME/windSpeedScale);
|
||||
float noiseLevel = texture(noise, timeOffset + worldPos.xz/noiseScale).r;
|
||||
NORMAL = (VIEW_MATRIX * vec4(0.0, 1.0, 0.0, 0.0)).xyz;
|
||||
ALBEDO = mix(color, shade, UV.y) * mix(color, shade, noiseLevel);
|
||||
LIGHT_VERTEX = instance_origin;
|
||||
}
|
||||
|
||||
void light() {
|
||||
float lambert = clamp(dot(NORMAL, LIGHT), 0.0, 1.0);
|
||||
float halfLambert = pow(lambert*0.5 + 0.5, 5);
|
||||
DIFFUSE_LIGHT += halfLambert * ATTENUATION * LIGHT_COLOR / PI;
|
||||
}
|
||||
1
grass/grass.gdshader.uid
Normal file
1
grass/grass.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dkvxju1uruobh
|
||||
20
grass/m_grass.tres
Normal file
20
grass/m_grass.tres
Normal file
@@ -0,0 +1,20 @@
|
||||
[gd_resource type="ShaderMaterial" load_steps=4 format=3 uid="uid://bpfgcchpiq8wr"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://dkvxju1uruobh" path="res://grass/grass.gdshader" id="1_1atig"]
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_1atig"]
|
||||
domain_warp_amplitude = 110.655
|
||||
domain_warp_frequency = 0.045
|
||||
|
||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_wnfha"]
|
||||
noise = SubResource("FastNoiseLite_1atig")
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_1atig")
|
||||
shader_parameter/color = Color(0, 0.7518667, 0, 1)
|
||||
shader_parameter/shade = Color(0, 0.54901963, 0.34901962, 1)
|
||||
shader_parameter/noise = SubResource("NoiseTexture2D_wnfha")
|
||||
shader_parameter/noiseScale = 78.52
|
||||
shader_parameter/windSpeedScale = 100.0
|
||||
shader_parameter/windVertexOffsetScale = 0.126
|
||||
1
icon.svg
Normal file
1
icon.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128"><rect width="124" height="124" x="2" y="2" fill="#363d52" stroke="#212532" stroke-width="4" rx="14"/><g fill="#fff" transform="translate(12.322 12.322)scale(.101)"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 814 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H446l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c0 34 58 34 58 0v-86c0-34-58-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042" transform="translate(12.322 12.322)scale(.101)"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></svg>
|
||||
|
After Width: | Height: | Size: 995 B |
43
icon.svg.import
Normal file
43
icon.svg.import
Normal file
@@ -0,0 +1,43 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dujjo2df0xstu"
|
||||
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.svg"
|
||||
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
13
m_test.tres
Normal file
13
m_test.tres
Normal file
@@ -0,0 +1,13 @@
|
||||
[gd_resource type="ShaderMaterial" load_steps=4 format=3 uid="uid://cte0a7msxn4b5"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://crgnrdun1t0oh" path="res://test.gdshader" id="1_vms17"]
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_vms17"]
|
||||
|
||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_fecht"]
|
||||
noise = SubResource("FastNoiseLite_vms17")
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_vms17")
|
||||
shader_parameter/textureMap = SubResource("NoiseTexture2D_fecht")
|
||||
19
project.godot
Normal file
19
project.godot
Normal file
@@ -0,0 +1,19 @@
|
||||
; Engine configuration file.
|
||||
; It's best edited using the editor UI and not directly,
|
||||
; since the parameters that go here are not all obvious.
|
||||
;
|
||||
; Format:
|
||||
; [section] ; section goes between []
|
||||
; param=value ; assign values to parameters
|
||||
|
||||
config_version=5
|
||||
|
||||
[application]
|
||||
|
||||
config/name="ShaderTests"
|
||||
config/features=PackedStringArray("4.5", "Forward Plus")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
[dotnet]
|
||||
|
||||
project/assembly_name="ShaderTests"
|
||||
19
test.gdshader
Normal file
19
test.gdshader
Normal file
@@ -0,0 +1,19 @@
|
||||
shader_type spatial;
|
||||
//render_mode vertex_lighting;
|
||||
|
||||
uniform sampler2D textureMap : source_color;
|
||||
|
||||
void vertex() {
|
||||
// Called for every vertex the material is visible on.
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
ALBEDO = texture(textureMap, UV).rgb;
|
||||
//LIGHT_VERTEX = vec3(0.0);
|
||||
}
|
||||
|
||||
void light() {
|
||||
float lambert = clamp(dot(NORMAL, LIGHT), 0.0, 1.0);
|
||||
float halfLambert = pow(lambert*0.5 + 0.5, 5);
|
||||
DIFFUSE_LIGHT += halfLambert * ATTENUATION * LIGHT_COLOR / PI;
|
||||
}
|
||||
1
test.gdshader.uid
Normal file
1
test.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://crgnrdun1t0oh
|
||||
Reference in New Issue
Block a user