summaryrefslogtreecommitdiff
path: root/servers/visual
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-07-08 12:34:05 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-07-08 12:36:15 -0300
commitf4c8c552f956094e1bb8787de79476f57dd6a7b6 (patch)
tree4ed1eb9e7d0a9401db6eaaadf257d8e73e03b499 /servers/visual
parent0067982f5ece3145c00e2f4c0bc092d1ec28c8b3 (diff)
Added triplanar mapping, toon mode, and more specular modes for materials. Added multipass support for materials.
Diffstat (limited to 'servers/visual')
-rw-r--r--servers/visual/rasterizer.h2
-rw-r--r--servers/visual/shader_types.cpp6
-rw-r--r--servers/visual/visual_server_raster.h1
-rw-r--r--servers/visual/visual_server_wrap_mt.h1
4 files changed, 10 insertions, 0 deletions
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h
index 69fd097ee8..8c9d8f089c 100644
--- a/servers/visual/rasterizer.h
+++ b/servers/visual/rasterizer.h
@@ -225,6 +225,8 @@ public:
virtual void material_set_line_width(RID p_material, float p_width) = 0;
+ virtual void material_set_next_pass(RID p_material, RID p_next_material) = 0;
+
virtual bool material_is_animated(RID p_material) = 0;
virtual bool material_casts_shadows(RID p_material) = 0;
diff --git a/servers/visual/shader_types.cpp b/servers/visual/shader_types.cpp
index c7ffcb5095..9cd7a3faeb 100644
--- a/servers/visual/shader_types.cpp
+++ b/servers/visual/shader_types.cpp
@@ -136,6 +136,12 @@ ShaderTypes::ShaderTypes() {
shader_modes[VS::SHADER_SPATIAL].modes.insert("diffuse_half_lambert");
shader_modes[VS::SHADER_SPATIAL].modes.insert("diffuse_oren_nayar");
shader_modes[VS::SHADER_SPATIAL].modes.insert("diffuse_burley");
+ shader_modes[VS::SHADER_SPATIAL].modes.insert("diffuse_toon");
+
+ shader_modes[VS::SHADER_SPATIAL].modes.insert("specular_schlick_ggx");
+ shader_modes[VS::SHADER_SPATIAL].modes.insert("specular_blinn");
+ shader_modes[VS::SHADER_SPATIAL].modes.insert("specular_phong");
+ shader_modes[VS::SHADER_SPATIAL].modes.insert("specular_toon");
shader_modes[VS::SHADER_SPATIAL].modes.insert("skip_vertex_transform");
shader_modes[VS::SHADER_SPATIAL].modes.insert("world_vertex_coords");
diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h
index 448af17478..1573116c50 100644
--- a/servers/visual/visual_server_raster.h
+++ b/servers/visual/visual_server_raster.h
@@ -685,6 +685,7 @@ public:
BIND2RC(Variant, material_get_param, RID, const StringName &)
BIND2(material_set_line_width, RID, float)
+ BIND2(material_set_next_pass, RID, RID)
/* MESH API */
diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h
index c8afc18740..6a1b0f7e46 100644
--- a/servers/visual/visual_server_wrap_mt.h
+++ b/servers/visual/visual_server_wrap_mt.h
@@ -129,6 +129,7 @@ public:
FUNC2RC(Variant, material_get_param, RID, const StringName &)
FUNC2(material_set_line_width, RID, float)
+ FUNC2(material_set_next_pass, RID, RID)
/* MESH API */