Fix #137621: Cycles curve info random gives wrong value

Caused by filter width changes in 5ce239cc22.

Pull Request: https://projects.blender.org/blender/blender/pulls/137671
This commit is contained in:
Brecht Van Lommel 2025-04-17 16:10:33 +02:00
parent d53fdfc7c3
commit df053e290d
3 changed files with 10 additions and 4 deletions

View file

@ -4725,7 +4725,10 @@ void HairInfoNode::compile(SVMCompiler &compiler)
out = output("Random");
if (!out->links.empty()) {
const int attr = compiler.attribute(ATTR_STD_CURVE_RANDOM);
compiler.add_node(NODE_ATTR, attr, compiler.stack_assign(out), NODE_ATTR_OUTPUT_FLOAT);
compiler.add_node(NODE_ATTR,
attr,
compiler.encode_uchar4(compiler.stack_assign(out), NODE_ATTR_OUTPUT_FLOAT),
__float_as_uint(0.0f));
}
}
@ -4777,7 +4780,10 @@ void PointInfoNode::compile(SVMCompiler &compiler)
out = output("Random");
if (!out->links.empty()) {
const int attr = compiler.attribute(ATTR_STD_POINT_RANDOM);
compiler.add_node(NODE_ATTR, attr, compiler.stack_assign(out), NODE_ATTR_OUTPUT_FLOAT);
compiler.add_node(NODE_ATTR,
attr,
compiler.encode_uchar4(compiler.stack_assign(out), NODE_ATTR_OUTPUT_FLOAT),
__float_as_uint(0.0f));
}
}

@ -1 +1 @@
Subproject commit abac1749ba20f7eecc23b424b183a93d41dc186d
Subproject commit cb97b1445fd739c8ec5c69c446f2748255ddcdb0

View file

@ -117,7 +117,7 @@ BLOCKLIST_GPU = [
'denoise_hair.blend',
'hair_basemesh_intercept.blend',
'hair_instancer_uv.blend',
'hair_length_info.blend',
'hair_info.blend',
'hair_particle_random.blend',
"hair_transmission.blend",
'principled_hair_.*.blend',