bricks with seperate textures

pull/2/head
Sascha 2024-05-31 10:47:56 +07:00
parent e0344c19a8
commit 7425ffefc0
12 changed files with 220 additions and 60 deletions

File diff suppressed because one or more lines are too long

@ -0,0 +1,6 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://d3r5t8gnc2y1l"]
[resource]
resource_name = "colormap"
cull_mode = 2
texture_filter = 2

@ -0,0 +1,63 @@
[gd_resource type="VisualShader" load_steps=6 format=3 uid="uid://cw52v3cvqy1tp"]
[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_fv6gs"]
output_port_for_preview = 0
source = 5
texture_type = 1
[sub_resource type="VisualShaderNodeTexture2DParameter" id="VisualShaderNodeTexture2DParameter_530f7"]
parameter_name = "tex1_color"
texture_type = 1
texture_filter = 6
texture_repeat = 1
[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_hf88l"]
default_input_values = [0, Vector3(0, 0, 0), 1, Vector3(128, 0, 0)]
[sub_resource type="Texture2DArray" id="Texture2DArray_lk6j3"]
[sub_resource type="VisualShaderNodeTexture2DArray" id="VisualShaderNodeTexture2DArray_lh6mx"]
texture_array = SubResource("Texture2DArray_lk6j3")
[resource]
code = "shader_type spatial;
render_mode blend_mix, depth_draw_opaque, cull_back, diffuse_lambert, specular_schlick_ggx;
uniform sampler2DArray tex3d_frg_6;
uniform sampler2D tex1_color : source_color, filter_linear_mipmap_anisotropic, repeat_enable;
void fragment() {
vec4 n_out6p0;
// Texture2DArray:6
n_out6p0 = texture(tex3d_frg_6, vec3(UV, 0.0));
// VectorOp:5
vec3 n_in5p1 = vec3(128.00000, 0.00000, 0.00000);
vec3 n_out5p0 = vec3(n_out6p0.xyz) + n_in5p1;
vec4 n_out2p0;
// Texture2D:2
n_out2p0 = texture(tex1_color, vec2(n_out5p0.xy));
// Output:0
ALBEDO = vec3(n_out2p0.xyz);
}
"
graph_offset = Vector2(-82.494, 20.698)
nodes/fragment/0/position = Vector2(1060, 80)
nodes/fragment/2/node = SubResource("VisualShaderNodeTexture_fv6gs")
nodes/fragment/2/position = Vector2(740, 180)
nodes/fragment/3/node = SubResource("VisualShaderNodeTexture2DParameter_530f7")
nodes/fragment/3/position = Vector2(360, 360)
nodes/fragment/5/node = SubResource("VisualShaderNodeVectorOp_hf88l")
nodes/fragment/5/position = Vector2(320, 120)
nodes/fragment/6/node = SubResource("VisualShaderNodeTexture2DArray_lh6mx")
nodes/fragment/6/position = Vector2(-40, 160)
nodes/fragment/connections = PackedInt32Array(2, 0, 0, 0, 3, 0, 2, 2, 5, 0, 2, 0, 6, 0, 5, 0)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dmx5ewgjsl4w5"
path.s3tc="res://.godot/imported/blue.png-2d37a2518b2c84575f2554450bfa7b84.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://resources/models/bricks/Textures/blue.png"
dest_files=["res://.godot/imported/blue.png-2d37a2518b2c84575f2554450bfa7b84.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
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=0

@ -1,31 +0,0 @@
[gd_resource type="VisualShader" load_steps=3 format=3 uid="uid://d72851yxerfy"]
[ext_resource type="Texture2D" uid="uid://c0bu5ctjbvlmv" path="res://resources/models/bricks/Textures/colormap.png" id="1_icnpd"]
[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_yv4v8"]
texture = ExtResource("1_icnpd")
texture_type = 1
[resource]
code = "shader_type spatial;
render_mode blend_mix, depth_draw_opaque, cull_back, diffuse_lambert, specular_schlick_ggx;
uniform sampler2D tex_frg_2 : source_color;
void fragment() {
// Texture2D:2
vec4 n_out2p0 = texture(tex_frg_2, UV);
// Output:0
ALBEDO = vec3(n_out2p0.xyz);
}
"
nodes/fragment/0/position = Vector2(540, 160)
nodes/fragment/2/node = SubResource("VisualShaderNodeTexture_yv4v8")
nodes/fragment/2/position = Vector2(140, 160)
nodes/fragment/connections = PackedInt32Array(2, 0, 0, 0)

@ -1,9 +1,9 @@
[remap]
importer="texture"
type="CompressedTexture2D"
importer="2d_array_texture"
type="CompressedTexture2DArray"
uid="uid://c0bu5ctjbvlmv"
path.s3tc="res://.godot/imported/colormap.png-4aba87b4ce7a23300690f639084a8d78.s3tc.ctex"
path.s3tc="res://.godot/imported/colormap.png-4aba87b4ce7a23300690f639084a8d78.s3tc.ctexarray"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
@ -12,7 +12,7 @@ metadata={
[deps]
source_file="res://resources/models/bricks/Textures/colormap.png"
dest_files=["res://.godot/imported/colormap.png-4aba87b4ce7a23300690f639084a8d78.s3tc.ctex"]
dest_files=["res://.godot/imported/colormap.png-4aba87b4ce7a23300690f639084a8d78.s3tc.ctexarray"]
[params]
@ -20,16 +20,8 @@ compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
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=0
slices/horizontal=16
slices/vertical=4

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dsxvgas7rt4ii"
path.s3tc="res://.godot/imported/green.png-3165080f5681417bfb01c54cd50424dc.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://resources/models/bricks/Textures/green.png"
dest_files=["res://.godot/imported/green.png-3165080f5681417bfb01c54cd50424dc.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://vtpq6hjto7i5"
path.s3tc="res://.godot/imported/orange.png-f6278aab89b95cd6eb09c8136db7ead9.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://resources/models/bricks/Textures/orange.png"
dest_files=["res://.godot/imported/orange.png-f6278aab89b95cd6eb09c8136db7ead9.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
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=0

@ -9,7 +9,7 @@
[ext_resource type="PackedScene" uid="uid://dtishjt1o2r2y" path="res://packed-scenes/zombie_c.tscn" id="6_mkx4u"]
[ext_resource type="PackedScene" uid="uid://dtehhqrqtplan" path="res://packed-scenes/knight.tscn" id="7_u2hik"]
[ext_resource type="PackedScene" uid="uid://670weiu5lj4u" path="res://packed-scenes/skeleton_warrior_old.tscn" id="8_rn4yx"]
[ext_resource type="PackedScene" uid="uid://b103v0pca3d0h" path="res://resources/models/bricks/bevel-hq-brick-2x4.glb" id="10_bbtnw"]
[ext_resource type="PackedScene" uid="uid://dkxuix3mccyo6" path="res://packed-scenes/bevel_hq_brick_2x_42.tscn" id="10_mogtl"]
[sub_resource type="PlaneMesh" id="PlaneMesh_473ws"]
material = ExtResource("3_w0uw1")
@ -59,5 +59,22 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 0, 2)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 0, 3)
script = null
[node name="bevel-hq-brick-2x42" parent="." instance=ExtResource("10_bbtnw")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.86716, 4.76837e-07, 7.92828)
[node name="Bricks" type="Node" parent="."]
[node name="bevel-hq-brick-2x42" parent="Bricks" instance=ExtResource("10_mogtl")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -3)
[node name="bevel-hq-brick-2x43" parent="Bricks" instance=ExtResource("10_mogtl")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.312757, 0, -3)
[node name="bevel-hq-brick-2x44" parent="Bricks" instance=ExtResource("10_mogtl")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.628362, 0, -3)
[node name="bevel-hq-brick-2x45" parent="Bricks" instance=ExtResource("10_mogtl")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.155682, 0.1, -3)
[node name="bevel-hq-brick-2x46" parent="Bricks" instance=ExtResource("10_mogtl")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.474682, 0.1, -3)
[node name="bevel-hq-brick-2x47" parent="Bricks" instance=ExtResource("10_mogtl")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.316636, 0.2, -3)