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:
authorTon Roosendaal <ton@blender.org>2005-09-29 17:19:07 +0400
committerTon Roosendaal <ton@blender.org>2005-09-29 17:19:07 +0400
commit03e1ec988b0b652ae4ecbbbd5b3214740c29f2e8 (patch)
tree47fb7a5440a984d883b33843f9419f89a9e8be2f /source/blender/blenkernel/BKE_bad_level_calls.h
parentc4b8a431bcb4b02c9da4e14485e97f6e4cbfa3a3 (diff)
- Added "anisotropic" rendering for static particle hair strands.
This means the diffuse and specular shaders don't use the normal for hair (which is actually undefined, a hair is micro cylinder) but it uses the tangent vector (vector in direction of hair). For Diffuse, it computes a fake normal now, representing the optimal hair normal pointing towards the light. All current builtin shaders work with this, including ramps. For Specular, it uses another formula to remap dot products for all lines that now use the tangent vector instead of the normal: dot = vector * tangent dot = sqrt(1.0 - dot*dot) Gives better results than using the 'fake' normal for diffuse. Officially (according the papers) this could be used for diffuse too, but then hair becomes very flat. Now you can control the flatness easily with ramps or using Oren-Nayer for example. Example image (disappears in some weeks) http://www.blender.org/bf/rt9.jpg - Added new texture channel "Strand" to apply textures on hairs over the length of hair (1 dimensional). Orco now gives 1 fixed coordinate for the entire hair, based on where it starts. Note; UV doesn't work yet. Nor vertexcolor. http://www.blender.org/bf/rt10.jpg
Diffstat (limited to 'source/blender/blenkernel/BKE_bad_level_calls.h')
-rw-r--r--source/blender/blenkernel/BKE_bad_level_calls.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/blenkernel/BKE_bad_level_calls.h b/source/blender/blenkernel/BKE_bad_level_calls.h
index e88341dd201..ac91ea746eb 100644
--- a/source/blender/blenkernel/BKE_bad_level_calls.h
+++ b/source/blender/blenkernel/BKE_bad_level_calls.h
@@ -76,14 +76,16 @@ extern struct ListBase editNurb;
#include "DNA_world_types.h" /* for render_types */
#include "render_types.h"
extern struct RE_Render R;
-float Blinn_Spec(float *n, float *l, float *v, float a, float b);
-float Phong_Spec(float *, float *, float *, int);
-float CookTorr_Spec(float *n, float *l, float *v, int hard);
-float Toon_Spec(float *n, float *l, float *v, float a, float b);
-float WardIso_Spec(float *n, float *l, float *v, float a);
+float Blinn_Spec(float *n, float *l, float *v, float a, float b, int);
+float Phong_Spec(float *, float *, float *, int, int);
+float CookTorr_Spec(float *n, float *l, float *v, int hard, int);
+float Toon_Spec(float *n, float *l, float *v, float a, float b, int);
+float WardIso_Spec(float *n, float *l, float *v, float a, int);
+
float Toon_Diff(float *n, float *l, float *v, float a, float b);
float OrenNayar_Diff(float *n, float *l, float *v, float rough);
float Minnaert_Diff(float nl, float *n, float *v, float a);
+
void add_to_diffuse(float *, ShadeInput *, float, float, float, float);
void ramp_diffuse_result(float *diff, ShadeInput *shi);
void do_specular_ramp(ShadeInput *shi, float is, float t, float *spec);