From 3a43e08deb4354175e5d40a37dc4dafea476176b Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Tue, 8 Mar 2011 16:08:43 +0000 Subject: Bugfix & Feature fix: Only Shadow Material options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch from Miika Hämäläinen. The old Material "Only Shadow" used an ancient 'best guess' formula using Lamp Distance and some averaging for converting shadow values to alpha. A couple of bug reporters already complained about the not very predictable renders. Miika fixed this by adding two new options, to only give the true shadow factor exclusively, or to give a result including light intensity values. More info: http://projects.blender.org/tracker/index.php?func=detail&aid=26413&group_id=9&atid=127 --- source/blender/makesdna/DNA_material_types.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna/DNA_material_types.h') diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index 860da1d80a4..1489593f7f6 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -160,7 +160,8 @@ typedef struct Material { short sss_flag, sss_preset; int mapto_textured; /* render-time cache to optimise texture lookups */ - int pad4; + short shadowonly_flag; /* "shadowsonly" type */ + short pad; ListBase gpumaterial; /* runtime */ } Material; @@ -238,6 +239,11 @@ typedef struct Material { #define MA_RAYMIR_FADETOSKY 0 #define MA_RAYMIR_FADETOMAT 1 +/* shadowonly_flag */ +#define MA_SO_OLD 0 +#define MA_SO_SHADOW 1 +#define MA_SO_SHADED 2 + /* shade_flag */ #define MA_CUBIC 1 #define MA_OBCOLOR 2 -- cgit v1.2.3