Code cleanup: move rng into path state.
Also pass by value and don't write back now that it is just a hash for seeding and no longer an LCG state. Together this makes CUDA a tiny bit faster in my tests, but mainly simplifies code.
This commit is contained in:
@@ -219,7 +219,7 @@ ccl_device void subsurface_color_bump_blur(KernelGlobals *kg,
|
||||
|
||||
if(bump || texture_blur > 0.0f) {
|
||||
/* average color and normal at incoming point */
|
||||
shader_eval_surface(kg, sd, NULL, state, 0.0f, state_flag, SHADER_CONTEXT_SSS);
|
||||
shader_eval_surface(kg, sd, state, 0.0f, state_flag, SHADER_CONTEXT_SSS);
|
||||
float3 in_color = shader_bssrdf_sum(sd, (bump)? N: NULL, NULL);
|
||||
|
||||
/* we simply divide out the average color and multiply with the average
|
||||
@@ -243,7 +243,7 @@ ccl_device_inline int subsurface_scatter_multi_intersect(
|
||||
SubsurfaceIntersection *ss_isect,
|
||||
ShaderData *sd,
|
||||
ShaderClosure *sc,
|
||||
RNG *lcg_state,
|
||||
uint *lcg_state,
|
||||
float disk_u,
|
||||
float disk_v,
|
||||
bool all)
|
||||
|
Reference in New Issue
Block a user