feat: more work on tree graphics
This commit is contained in:
parent
4f525b2b16
commit
1f76dbbc8a
22 changed files with 1591 additions and 4 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -32,7 +32,14 @@ animation/trimming=false
|
|||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
_subresources={}
|
||||
_subresources={
|
||||
"materials": {
|
||||
"leaves": {
|
||||
"use_external/enabled": true,
|
||||
"use_external/path": "uid://dqtsjjn0jp0oj"
|
||||
}
|
||||
}
|
||||
}
|
||||
blender/nodes/visible=0
|
||||
blender/nodes/active_collection_only=false
|
||||
blender/nodes/punctual_lights=true
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,4 +1,70 @@
|
|||
[gd_resource type="StandardMaterial3D" format=3 uid="uid://dqtsjjn0jp0oj"]
|
||||
[gd_resource type="ShaderMaterial" load_steps=3 format=3 uid="uid://dqtsjjn0jp0oj"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://d1sxmql1f46f6" path="res://materials/leaves_albedo.png" id="1_dgtoi"]
|
||||
|
||||
[sub_resource type="Shader" id="Shader_6fq30"]
|
||||
code = "// NOTE: Shader automatically converted from Godot Engine 4.4.2.rc's StandardMaterial3D.
|
||||
|
||||
shader_type spatial;
|
||||
render_mode blend_mix, depth_draw_opaque, cull_disabled, diffuse_burley, specular_schlick_ggx, skip_vertex_transform;
|
||||
|
||||
uniform vec4 albedo : source_color;
|
||||
uniform sampler2D texture_albedo : source_color, filter_linear_mipmap, repeat_enable;
|
||||
uniform ivec2 albedo_texture_size;
|
||||
uniform float point_size : hint_range(0.1, 128.0, 0.1);
|
||||
|
||||
uniform float roughness : hint_range(0.0, 1.0);
|
||||
uniform sampler2D texture_metallic : hint_default_white, filter_linear_mipmap, repeat_enable;
|
||||
uniform vec4 metallic_texture_channel;
|
||||
uniform sampler2D texture_roughness : hint_roughness_r, filter_linear_mipmap, repeat_enable;
|
||||
|
||||
uniform float specular : hint_range(0.0, 1.0, 0.01);
|
||||
uniform float metallic : hint_range(0.0, 1.0, 0.01);
|
||||
|
||||
uniform vec3 uv1_scale;
|
||||
uniform vec3 uv1_offset;
|
||||
uniform vec3 uv2_scale;
|
||||
uniform vec3 uv2_offset;
|
||||
|
||||
void vertex() {
|
||||
VERTEX = (MODELVIEW_MATRIX * vec4(VERTEX * 1.2, 1.0)).xyz;
|
||||
NORMAL = normalize((MODELVIEW_MATRIX * vec4(NORMAL, 0.0)).xyz);
|
||||
BINORMAL = normalize((MODELVIEW_MATRIX * vec4(BINORMAL, 0.0)).xyz);
|
||||
TANGENT = normalize((MODELVIEW_MATRIX * vec4(TANGENT, 0.0)).xyz);
|
||||
|
||||
UV = UV * uv1_scale.xy + uv1_offset.xy;
|
||||
vec3 center = vec3(VIEWPORT_SIZE / 2.0, 0.0);
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec2 base_uv = UV;
|
||||
|
||||
vec4 albedo_tex = texture(texture_albedo, base_uv);
|
||||
ALBEDO = albedo.rgb * albedo_tex.rgb;
|
||||
ALPHA = albedo_tex.a;
|
||||
|
||||
float metallic_tex = dot(texture(texture_metallic, base_uv), metallic_texture_channel);
|
||||
METALLIC = metallic_tex * metallic;
|
||||
SPECULAR = specular;
|
||||
|
||||
vec4 roughness_texture_channel = vec4(1.0, 0.0, 0.0, 0.0);
|
||||
float roughness_tex = dot(texture(texture_roughness, base_uv), roughness_texture_channel);
|
||||
ROUGHNESS = roughness_tex * roughness;
|
||||
}
|
||||
"
|
||||
|
||||
[resource]
|
||||
albedo_color = Color(0.27451, 0.388235, 0.192157, 1)
|
||||
render_priority = 0
|
||||
shader = SubResource("Shader_6fq30")
|
||||
shader_parameter/albedo = Color(0.27451, 0.388235, 0.192157, 1)
|
||||
shader_parameter/texture_albedo = ExtResource("1_dgtoi")
|
||||
shader_parameter/albedo_texture_size = Vector2i(0, 0)
|
||||
shader_parameter/point_size = 1.0
|
||||
shader_parameter/roughness = 1.0
|
||||
shader_parameter/metallic_texture_channel = Vector4(1, 0, 0, 0)
|
||||
shader_parameter/specular = 0.5
|
||||
shader_parameter/metallic = 0.0
|
||||
shader_parameter/uv1_scale = Vector3(1, 1, 1)
|
||||
shader_parameter/uv1_offset = Vector3(0, 0, 0)
|
||||
shader_parameter/uv2_scale = Vector3(1, 1, 1)
|
||||
shader_parameter/uv2_offset = Vector3(0, 0, 0)
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue