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:
Diffstat (limited to 'source/blender/nodes/intern/SHD_nodes/SHD_geom.c')
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_geom.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_geom.c b/source/blender/nodes/intern/SHD_nodes/SHD_geom.c
index ab1bec199f3..aefe7d104b5 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_geom.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_geom.c
@@ -54,7 +54,6 @@ static void node_shader_exec_geom(void *data, bNode *node, bNodeStack **in, bNod
NodeGeometry *ngeo= (NodeGeometry*)node->storage;
ShadeInputUV *suv= &shi->uv[shi->actuv];
static float defaultvcol[4] = {1.0f, 1.0f, 1.0f, 1.0f};
- static float front= 0.0;
int i;
if(ngeo->uvname[0]) {
@@ -109,14 +108,8 @@ static void node_shader_exec_geom(void *data, bNode *node, bNodeStack **in, bNod
out[GEOM_OUT_NORMAL]->datatype= NS_OSA_VECTORS;
}
- /* front/back
- * check the original un-flipped normals to determine front or back side */
- if (shi->orignor[2] < FLT_EPSILON) {
- front= 1.0f;
- } else {
- front = 0.0f;
- }
- out[GEOM_OUT_FRONTBACK]->vec[0]= front;
+ /* front/back, normal flipping was stored */
+ out[GEOM_OUT_FRONTBACK]->vec[0]= (shi->flippednor)? 0.0f: 1.0f;
}
}