EEVEE: Geometry info -> tangent: Make consistent with Cycles for hair
Changes output for geometry info node in Eevee to be consistent with Cycles (w/o osl) Before this patch Eevee outputs Z-tangent even for hair. This patch changes it to output hair tangent (growth direction). Hair tangent is impossible to derive otherwise from normal or view direction. Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D10841
This commit is contained in:
parent
5239198f17
commit
a294670bac
Notes:
blender-bot
2023-02-14 02:30:11 +01:00
Referenced by issue #88404, use-after-free crash after setting scene's render.engine inside custom render engine context
|
@ -37,8 +37,13 @@ void node_geometry(vec3 I,
|
|||
normal = (toworld * vec4(N, 0.0)).xyz;
|
||||
true_normal = normal;
|
||||
# endif
|
||||
|
||||
# ifdef HAIR_SHADER
|
||||
tangent = -hairTangent;
|
||||
# else
|
||||
tangent_orco_z(orco, orco);
|
||||
node_tangent(N, orco, objmat, tangent);
|
||||
# endif
|
||||
|
||||
parametric = vec3(barycentric, 0.0);
|
||||
backfacing = (gl_FrontFacing) ? 0.0 : 1.0;
|
||||
|
|
Loading…
Reference in New Issue