forked from bartvdbraak/blender
Cycles: Cleanup and optimization comment update
This commit is contained in:
parent
eff2fe9a72
commit
09ac6cae09
@ -646,8 +646,8 @@ ccl_device_inline bool bvh_curve_intersect(KernelGlobals *kg, Intersection *isec
|
||||
float4 P_curve[2];
|
||||
|
||||
if(type & PRIMITIVE_CURVE) {
|
||||
P_curve[0]= kernel_tex_fetch(__curve_keys, k0);
|
||||
P_curve[1]= kernel_tex_fetch(__curve_keys, k1);
|
||||
P_curve[0] = kernel_tex_fetch(__curve_keys, k0);
|
||||
P_curve[1] = kernel_tex_fetch(__curve_keys, k1);
|
||||
}
|
||||
else {
|
||||
int fobject = (object == OBJECT_NONE)? kernel_tex_fetch(__prim_object, curveAddr): object;
|
||||
|
@ -27,7 +27,12 @@ CCL_NAMESPACE_BEGIN
|
||||
|
||||
ccl_device_inline int find_attribute_curve_motion(KernelGlobals *kg, int object, uint id, AttributeElement *elem)
|
||||
{
|
||||
/* todo: find a better (faster) solution for this, maybe store offset per object */
|
||||
/* todo: find a better (faster) solution for this, maybe store offset per object.
|
||||
*
|
||||
* NOTE: currently it's not a bottleneck because in test scenes the loop below runs
|
||||
* zero iterations and rendering is really slow with motion curves. For until other
|
||||
* areas are speed up it's probably not so crucial to optimize this out.
|
||||
*/
|
||||
uint attr_offset = object*kernel_data.bvh.attributes_map_stride + ATTR_PRIM_CURVE;
|
||||
uint4 attr_map = kernel_tex_fetch(__attributes_map, attr_offset);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user