forked from blender/blender
main sync #3
@ -7,13 +7,24 @@ void node_bsdf_hair(vec4 color,
|
|||||||
float weight,
|
float weight,
|
||||||
out Closure result)
|
out Closure result)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
|
/* NOTE(fclem): This is the way it should be. But we don't have proper implementation of the hair
|
||||||
|
* closure yet. For now fall back to a simpler diffuse surface so that we have at least a color
|
||||||
|
* feedback. */
|
||||||
ClosureHair hair_data;
|
ClosureHair hair_data;
|
||||||
hair_data.weight = weight;
|
hair_data.weight = weight;
|
||||||
hair_data.color = color.rgb;
|
hair_data.color = color.rgb;
|
||||||
hair_data.offset = offset;
|
hair_data.offset = offset;
|
||||||
hair_data.roughness = vec2(roughness_u, roughness_v);
|
hair_data.roughness = vec2(roughness_u, roughness_v);
|
||||||
hair_data.T = T;
|
hair_data.T = T;
|
||||||
|
#else
|
||||||
|
ClosureDiffuse hair_data;
|
||||||
|
hair_data.weight = weight;
|
||||||
|
hair_data.color = color.rgb;
|
||||||
|
hair_data.N = g_data.N;
|
||||||
|
hair_data.sss_radius = vec3(0.0);
|
||||||
|
hair_data.sss_id = 0u;
|
||||||
|
#endif
|
||||||
result = closure_eval(hair_data);
|
result = closure_eval(hair_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,13 +45,22 @@ void node_bsdf_hair_principled(vec4 color,
|
|||||||
out Closure result)
|
out Closure result)
|
||||||
{
|
{
|
||||||
/* Placeholder closure.
|
/* Placeholder closure.
|
||||||
* Some computation will have to happen here just like the Principled BSDF. */
|
* Some computation will have to happen here just like the Principled BSDF.
|
||||||
|
* For now fall back to a simpler diffuse surface so that we have at least a color feedback. */
|
||||||
|
#if 0
|
||||||
ClosureHair hair_data;
|
ClosureHair hair_data;
|
||||||
hair_data.weight = weight;
|
hair_data.weight = weight;
|
||||||
hair_data.color = color.rgb;
|
hair_data.color = color.rgb;
|
||||||
hair_data.offset = offset;
|
hair_data.offset = offset;
|
||||||
hair_data.roughness = vec2(0.0);
|
hair_data.roughness = vec2(0.0);
|
||||||
hair_data.T = g_data.curve_B;
|
hair_data.T = g_data.curve_B;
|
||||||
|
#else
|
||||||
|
ClosureDiffuse hair_data;
|
||||||
|
hair_data.weight = weight;
|
||||||
|
hair_data.color = color.rgb;
|
||||||
|
hair_data.N = g_data.N;
|
||||||
|
hair_data.sss_radius = vec3(0.0);
|
||||||
|
hair_data.sss_id = 0u;
|
||||||
|
#endif
|
||||||
result = closure_eval(hair_data);
|
result = closure_eval(hair_data);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user