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:
authorBrecht Van Lommel <brecht>2021-10-17 17:10:10 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-10-18 20:02:10 +0300
commit1df3b51988852fa8ee6b530a64aa23346db9acd4 (patch)
treedd79dba4c8ff8bb8474cc399e9d1b308d845e0cb /intern/cycles/kernel/closure/bsdf_hair_principled.h
parent44c3bb729be42d6d67eaf8918d7cbcb2ff0b315d (diff)
Cycles: replace integrator state argument macros
* Rename struct KernelGlobals to struct KernelGlobalsCPU * Add KernelGlobals, IntegratorState and ConstIntegratorState typedefs that every device can define in its own way. * Remove INTEGRATOR_STATE_ARGS and INTEGRATOR_STATE_PASS macros and replace with these new typedefs. * Add explicit state argument to INTEGRATOR_STATE and similar macros In preparation for decoupling main and shadow paths. Differential Revision: https://developer.blender.org/D12888
Diffstat (limited to 'intern/cycles/kernel/closure/bsdf_hair_principled.h')
-rw-r--r--intern/cycles/kernel/closure/bsdf_hair_principled.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/kernel/closure/bsdf_hair_principled.h b/intern/cycles/kernel/closure/bsdf_hair_principled.h
index 17097b0739b..a474c5661b3 100644
--- a/intern/cycles/kernel/closure/bsdf_hair_principled.h
+++ b/intern/cycles/kernel/closure/bsdf_hair_principled.h
@@ -180,7 +180,7 @@ ccl_device_inline float longitudinal_scattering(
}
/* Combine the three values using their luminances. */
-ccl_device_inline float4 combine_with_energy(ccl_global const KernelGlobals *kg, float3 c)
+ccl_device_inline float4 combine_with_energy(KernelGlobals kg, float3 c)
{
return make_float4(c.x, c.y, c.z, linear_rgb_to_gray(kg, c));
}
@@ -229,7 +229,7 @@ ccl_device int bsdf_principled_hair_setup(ccl_private ShaderData *sd,
#endif /* __HAIR__ */
/* Given the Fresnel term and transmittance, generate the attenuation terms for each bounce. */
-ccl_device_inline void hair_attenuation(ccl_global const KernelGlobals *kg,
+ccl_device_inline void hair_attenuation(KernelGlobals kg,
float f,
float3 T,
ccl_private float4 *Ap)
@@ -281,7 +281,7 @@ ccl_device_inline void hair_alpha_angles(float sin_theta_i,
}
/* Evaluation function for our shader. */
-ccl_device float3 bsdf_principled_hair_eval(ccl_global const KernelGlobals *kg,
+ccl_device float3 bsdf_principled_hair_eval(KernelGlobals kg,
ccl_private const ShaderData *sd,
ccl_private const ShaderClosure *sc,
const float3 omega_in,
@@ -359,7 +359,7 @@ ccl_device float3 bsdf_principled_hair_eval(ccl_global const KernelGlobals *kg,
}
/* Sampling function for the hair shader. */
-ccl_device int bsdf_principled_hair_sample(ccl_global const KernelGlobals *kg,
+ccl_device int bsdf_principled_hair_sample(KernelGlobals kg,
ccl_private const ShaderClosure *sc,
ccl_private ShaderData *sd,
float randu,