parent
2595c77e83
commit
7cab61de50
9 changed files with 54 additions and 120 deletions
@ -0,0 +1,15 @@ |
|||||||
|
[gd_resource type="ShaderMaterial" load_steps=7 format=4 uid="uid://doe8owgx4jeu1"] |
||||||
|
|
||||||
|
[ext_resource type="Shader" path="res://terrain/terrain_shader.gdshader" id="1_mf55c"] |
||||||
|
[ext_resource type="Image" uid="uid://b0jp1dyxugbr7" path="res://assets/textures/terrain/grass.png" id="5_mau31"] |
||||||
|
[ext_resource type="Image" uid="uid://bpo7mkr6sctqr" path="res://assets/textures/terrain/dirt.png" id="6_xc3ue"] |
||||||
|
[ext_resource type="Image" uid="uid://dqyqg6yt7yk3k" path="res://assets/textures/terrain/rock.png" id="7_84wdo"] |
||||||
|
[ext_resource type="Image" uid="uid://bkwjxg6g2itag" path="res://assets/textures/terrain/sand.png" id="8_3fpcn"] |
||||||
|
|
||||||
|
[sub_resource type="Texture2DArray" id="Texture2DArray_3nq13"] |
||||||
|
_images = Array[Image]([ExtResource("5_mau31"), ExtResource("6_xc3ue"), ExtResource("7_84wdo"), ExtResource("8_3fpcn")]) |
||||||
|
|
||||||
|
[resource] |
||||||
|
render_priority = 0 |
||||||
|
shader = ExtResource("1_mf55c") |
||||||
|
shader_parameter/textures = SubResource("Texture2DArray_3nq13") |
@ -0,0 +1,12 @@ |
|||||||
|
shader_type spatial; |
||||||
|
render_mode blend_mix, depth_draw_opaque, cull_back, diffuse_burley, specular_schlick_ggx; |
||||||
|
|
||||||
|
uniform sampler2DArray textures : source_color, filter_linear_mipmap, repeat_enable; |
||||||
|
|
||||||
|
void fragment() { |
||||||
|
ALBEDO = texture(textures, vec3(UV, UV2.x)).rgb; |
||||||
|
|
||||||
|
METALLIC = 0.0; |
||||||
|
SPECULAR = 0.5; |
||||||
|
ROUGHNESS = 1.0; |
||||||
|
} |
Loading…
Reference in new issue