From 19a9f03c8642b35096477057db1240c5f97142db Mon Sep 17 00:00:00 2001 From: Silverlan Date: Fri, 1 Nov 2024 20:31:14 +0100 Subject: [PATCH] feat: update shader materials --- .../scripts/shader_data/materials/toon.udm | 9 ++++++++- assets/scripts/shader_data/materials/pbr.udm | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/assets/addons/toon_shader/scripts/shader_data/materials/toon.udm b/assets/addons/toon_shader/scripts/shader_data/materials/toon.udm index 5cd0834cf..363650fb0 100644 --- a/assets/addons/toon_shader/scripts/shader_data/materials/toon.udm +++ b/assets/addons/toon_shader/scripts/shader_data/materials/toon.udm @@ -11,6 +11,8 @@ $string type "float" $string name "rim_amount" $float default "0.716" + $float min 0.0 + $float max 1.0 }, { $string type "vec3" @@ -22,6 +24,8 @@ $string type "float" $string name "glossiness" $float default "8.0" + $float min 0.0 + $float max 20.0 } ] $array textures [element][ @@ -29,13 +33,16 @@ $string name "albedo_map" $bool colorMap 1 $bool required 1 + $string specializationType "albedo" }, { $string name "normal_map" + $string specializationType "normal" }, { $string name "matcap_map" - $string default "white" + $string default "matcap" + $string specializationType "matcap" } ] } diff --git a/assets/scripts/shader_data/materials/pbr.udm b/assets/scripts/shader_data/materials/pbr.udm index 842bb4103..530be2ea2 100644 --- a/assets/scripts/shader_data/materials/pbr.udm +++ b/assets/scripts/shader_data/materials/pbr.udm @@ -20,22 +20,31 @@ { $string type "float" $string name "phong_intensity" + $bool hideInEditor 1 $float default 1.0 + $float min 0.0 + $float max 1.0 }, { $string type "float" $string name "metalness_factor" $float default 0.0 + $float min 0.0 + $float max 1.0 }, { $string type "float" $string name "roughness_factor" $float default 0.5 + $float min 0.0 + $float max 1.0 }, { $string type "float" $string name "ao_factor" $float default 1.0 + $float min 0.0 + $float max 1.0 } ] $array textures [element][ @@ -43,19 +52,24 @@ $string name "albedo_map" $bool colorMap 1 $bool required 1 + $string specializationType "albedo" }, { $string name "normal_map" + $string specializationType "normal" }, { $string name "rma_map" + $string specializationType "rma" }, { $string name "emission_map" $string default "white" + $string specializationType "emission" }, { $string name "parallax_map" + $string specializationType "parallax" }, { $string name "wrinkle_stretch_map"