forked from bartvdbraak/blender
Fix T43388 Cycles Baking gives different results than Cycles Render
Reported and nailed down by Michale (MeshLogic). The code that fixes this was commented out, but Brecht gave the go ahead to use it even if it is not the real solution
This commit is contained in:
parent
86d2765ebe
commit
7b16fda379
@ -159,7 +159,8 @@ ccl_device bool is_light_pass(ShaderEvalType type)
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* this helps with AA but it's not the real solution as it does not AA the geometry
|
||||
* but it's better than nothing, thus committed */
|
||||
ccl_device_inline float bake_clamp_mirror_repeat(float u)
|
||||
{
|
||||
/* use mirror repeat (like opengl texture) so that if the barycentric
|
||||
@ -170,7 +171,6 @@ ccl_device_inline float bake_clamp_mirror_repeat(float u)
|
||||
|
||||
return (((int)fu) & 1)? 1.0f - u: u;
|
||||
}
|
||||
#endif
|
||||
|
||||
ccl_device void kernel_bake_evaluate(KernelGlobals *kg, ccl_global uint4 *input, ccl_global float4 *output,
|
||||
ShaderEvalType type, int i, int offset, int sample)
|
||||
@ -199,8 +199,6 @@ ccl_device void kernel_bake_evaluate(KernelGlobals *kg, ccl_global uint4 *input,
|
||||
|
||||
/* random number generator */
|
||||
RNG rng = cmj_hash(offset + i, kernel_data.integrator.seed);
|
||||
|
||||
#if 0
|
||||
uint rng_state = cmj_hash(i, kernel_data.integrator.seed);
|
||||
float filter_x, filter_y;
|
||||
path_rng_init(kg, &rng_state, sample, num_samples, &rng, 0, 0, &filter_x, &filter_y);
|
||||
@ -210,7 +208,6 @@ ccl_device void kernel_bake_evaluate(KernelGlobals *kg, ccl_global uint4 *input,
|
||||
u = bake_clamp_mirror_repeat(u + dudx*(filter_x - 0.5f) + dudy*(filter_y - 0.5f));
|
||||
v = bake_clamp_mirror_repeat(v + dvdx*(filter_x - 0.5f) + dvdy*(filter_y - 0.5f));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* triangle */
|
||||
int shader;
|
||||
|
Loading…
Reference in New Issue
Block a user