shader
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,53 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://ifqfine3ofh2"
|
||||
path="res://.godot/imported/HotDog.glb-49d3a46fc33ab2ee1e429d21416d8346.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/test/HotDog.glb"
|
||||
dest_files=["res://.godot/imported/HotDog.glb-49d3a46fc33ab2ee1e429d21416d8346.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
mesh_library/use_node_names_as_mesh_names=false
|
||||
array_mesh/deduplicate_surfaces=true
|
||||
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=false
|
||||
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={
|
||||
"materials": {
|
||||
"PaletteAssetsv1": {
|
||||
"use_external/enabled": false,
|
||||
"use_external/fallback_path": "res://assets/test/tex/PaletteAssetsv1.tres",
|
||||
"use_external/path": "uid://nbt0m5456g0x"
|
||||
}
|
||||
}
|
||||
}
|
||||
gltf/naming_version=2
|
||||
gltf/embedded_image_handling=1
|
||||
gltf/texture_map_mode=1
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 65 KiB |
@@ -0,0 +1,44 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dvcdurdl0hrmj"
|
||||
path.s3tc="res://.godot/imported/HotDog_PaletteAssets.png-37872b0cd0700d390f6038dd2dbb27a5.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
generator_parameters={
|
||||
"md5": "79256949e4824a5bc8b771d084907c3f"
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/test/HotDog_PaletteAssets.png"
|
||||
dest_files=["res://.godot/imported/HotDog_PaletteAssets.png-37872b0cd0700d390f6038dd2dbb27a5.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
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=true
|
||||
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=0
|
||||
@@ -0,0 +1,7 @@
|
||||
[gd_scene format=3 uid="uid://ouhrovtvstsf"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dh5ej8olhdv5x" path="res://assets/Furniture_FREE-af040129/SM_Bottle_1.glb" id="1_0vnai"]
|
||||
|
||||
[node name="Node3D" type="Node3D" unique_id=301733971]
|
||||
|
||||
[node name="SM_Bottle_12" parent="." unique_id=56545120 instance=ExtResource("1_0vnai")]
|
||||
+1
-1
@@ -107,7 +107,7 @@ rendering_device/driver.windows="d3d12"
|
||||
|
||||
diffuse_curve={
|
||||
"type": "sampler2D",
|
||||
"value": ""
|
||||
"value": "res://shader/new_gradient_texture_1d.tres"
|
||||
}
|
||||
specular_smoothness={
|
||||
"type": "float",
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
[gd_resource type="GradientTexture1D" format=3 uid="uid://b3fs6dwpeg753"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_67fj6"]
|
||||
offsets = PackedFloat32Array(0, 0.25754884, 0.6015394)
|
||||
colors = PackedColorArray(0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1)
|
||||
|
||||
[resource]
|
||||
gradient = SubResource("Gradient_67fj6")
|
||||
@@ -0,0 +1,20 @@
|
||||
[gd_resource type="ShaderMaterial" format=3 uid="uid://ps5swh44egxb"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://bbs8x8ygec4lo" path="res://shader/outline.gdshader" id="1_vdkh7"]
|
||||
[ext_resource type="Shader" uid="uid://wepsb3f7nni" path="res://shader/cel-shader-base.gdshader" id="2_63a2j"]
|
||||
[ext_resource type="Texture2D" uid="uid://b353hjk53b3ob" path="res://assets/Food Pack - Low Poly Assets/Can_PaletteAssets.png" id="3_63a2j"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_m5gih"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_vdkh7")
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
next_pass = SubResource("ShaderMaterial_m5gih")
|
||||
shader = ExtResource("2_63a2j")
|
||||
shader_parameter/color = Color(0.7, 0.12, 0.86, 1)
|
||||
shader_parameter/base_texture = ExtResource("3_63a2j")
|
||||
shader_parameter/specular = Color(0.3, 0.3, 0.3, 0.5)
|
||||
shader_parameter/fresnel = Color(0.2, 0.2, 0.2, 0.3)
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/uv_offset = Vector2(0, 0)
|
||||
@@ -0,0 +1,25 @@
|
||||
@tool
|
||||
extends Node3D
|
||||
|
||||
const ToonApply = preload("res://shader/toon_apply.gd")
|
||||
|
||||
|
||||
@export var cartoon_material: ShaderMaterial:
|
||||
set(value):
|
||||
cartoon_material = value
|
||||
_apply_materials()
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
_apply_materials()
|
||||
|
||||
func _apply_materials():
|
||||
if not is_inside_tree():
|
||||
return
|
||||
|
||||
# 未指定时默认使用 ToonApply
|
||||
var mat: Material = cartoon_material if cartoon_material != null else ToonApply as Material
|
||||
|
||||
for node in find_children("*", "MeshInstance3D", true, false):
|
||||
if node is MeshInstance3D:
|
||||
node.material_override = mat
|
||||
@@ -0,0 +1 @@
|
||||
uid://cyabo07rc0216
|
||||
Reference in New Issue
Block a user