Commit Graph

13 Commits

Author SHA1 Message Date
Alexander Gavrilov
c376878e54 Fix T49187: inconsistent Normal Map node output for backfacing polygons.
There basically are two issues here: in smooth mode (and all non-tangent
normal map types) it doesn't invert the normal for backfacing polys;
on the other hand for flat shaded tangent type it is inverted too soon.

This fix does a brute force correction by checking the backfacing flag.

Reviewers: #cycles, brecht

Reviewed By: #cycles, brecht

Differential Revision: https://developer.blender.org/D2181
2016-08-30 12:48:59 +03:00
ebdd2e0b6d Cycles: make shader node enums consistently lower case, update OSL shaders accordingly. 2016-06-11 23:50:11 +02:00
Thomas Dinges
ee36e75b85 Cleanup: Fix Cycles Apache header.
This was already mixed a bit, but the dot belongs there.
2014-12-25 02:50:24 +01:00
Brecht Van Lommel
b9ce231060 Cycles: relicense GNU GPL source code to Apache version 2.0.
More information in this post:
http://code.blender.org/

Thanks to all contributes for giving their permission!
2013-08-18 14:16:15 +00:00
Brecht Van Lommel
f9b06060c2 Fix #35729: cycles normal maps not showing properly in preview render. 2013-06-13 13:55:05 +00:00
Brecht Van Lommel
33d609144e Cycles: normal maps are now backwards compatible again after recent fix, with
a separate Blender Object/World Space that is compatible with Blender render
baking and uses the YZ flipping convention.
2013-05-28 14:24:03 +00:00
Brecht Van Lommel
601b8c1041 Fix #35505: cycles object space normal mapping did not match blender internal.
Now it uses the same (strange) YZ flipping convention.
2013-05-27 17:48:02 +00:00
Brecht Van Lommel
561cf26c2f Fix #35306: cycles normal mapping not working with flat shading. 2013-05-11 09:31:58 +00:00
Campbell Barton
d15d78a33a style cleanup: osl and NULL pointer use, also correct sequencer gap operator id's 2013-03-27 20:27:07 +00:00
Brecht Van Lommel
6adfd91657 Fix #33830: cycles normal mapping was not quite correct, was not correctly
respecting the assumption that normal and tangent are interpolated without
normalization.
2013-01-15 16:35:05 +00:00
Campbell Barton
c0078a9879 osl style cleanup and update man-page. 2012-12-04 03:18:08 +00:00
Brecht Van Lommel
e73408f247 Cycles: add strength input for normal map node. 2012-11-08 16:35:20 +00:00
Brecht Van Lommel
27d647dcf8 Cycles: 4 new nodes.
* Tangent: generate a tangent direction for anisotropic shading. Can be either
  radial around X/Y/Z axis, or from a UV map. The default tangent for the
  anisotropic BSDF and geometry node is now always radial Z, for UV tangent use
  this node now.

http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Tangent

* Normal Map: generate a perturbed normal from an RGB normal map image. This
  is usually chained with an Image Texture node in the color input, to specify
  the normal map image. For tangent space normal maps, the UV coordinates for
  the image must match, and the image texture should be set to Non-Color mode
  to give correct results.

http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Normal_Map

* Refraction BSDF: for best results this node should be considered as a building
  block and not be used on its own, but rather mixed with a glossy node using a
  fresnel type factor. Otherwise it will give quite dark results at the edges for
  glossy refraction.

http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#Refraction

* Ambient Occlusion: controls the amount of AO a surface receives, rather than
  having just a global factor in the world. Note that this outputs a shader and
  not a color, that's for another time.

http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#Ambient_Occlusion
2012-11-06 19:59:02 +00:00