Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2013-05-20 19:58:37 +0400
committerThomas Dinges <blender@dingto.org>2013-05-20 19:58:37 +0400
commit3758193c18a886faa5bb803dd378f24866e793e5 (patch)
tree9d013e4f7008845a3a2b04539396bb2e2e341888 /intern/cycles/kernel/shaders
parent38dc85f296a27a5641d296c8f41834db41dac18b (diff)
Cycles / Wireframe node:
* Added a wireframe node (Input category) to get access to Mesh wireframe data. The thickness can be controlled via a "Size" parameter, and is available in world units (default) and screen pixel size. * Only the triangulated mesh is available now, quads is for later. Documentation: http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Wireframe Render and Example file: http://www.pasteall.org/pic/show.php?id=51731 http://www.pasteall.org/blend/21510
Diffstat (limited to 'intern/cycles/kernel/shaders')
-rw-r--r--intern/cycles/kernel/shaders/CMakeLists.txt1
-rw-r--r--intern/cycles/kernel/shaders/node_wireframe.osl29
2 files changed, 30 insertions, 0 deletions
diff --git a/intern/cycles/kernel/shaders/CMakeLists.txt b/intern/cycles/kernel/shaders/CMakeLists.txt
index 0cff264d8e1..ae8ff88efd2 100644
--- a/intern/cycles/kernel/shaders/CMakeLists.txt
+++ b/intern/cycles/kernel/shaders/CMakeLists.txt
@@ -67,6 +67,7 @@ set(SRC_OSL
node_voronoi_texture.osl
node_ward_bsdf.osl
node_wave_texture.osl
+ node_wireframe.osl
)
set(SRC_OSL_HEADERS
diff --git a/intern/cycles/kernel/shaders/node_wireframe.osl b/intern/cycles/kernel/shaders/node_wireframe.osl
new file mode 100644
index 00000000000..c9e6e6f3ff4
--- /dev/null
+++ b/intern/cycles/kernel/shaders/node_wireframe.osl
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2013, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "stdosl.h"
+#include "oslutil.h"
+
+shader node_wireframe(
+ int use_pixel_size = 0,
+ float Size = 0.01,
+ output float Fac = 0.0)
+{
+ Fac = wireframe("triangles", Size, use_pixel_size);
+}
+