Cycles:
* Fix #29354: crash on branch file. Note that for best compatibility, you need to save your files with one of the latest branch builds, since not all version patching code was moved to trunk. * Rename "Cycles" to "Cycles Render" in info header menu. * Code tweaks to try to fix #29301. It's not a real solution though, I'm thinking cause is extended precision for floats on some cpu's, used in one case but not in the other, leading to bounding box intersection issue...
This commit is contained in:
@@ -43,7 +43,7 @@ from cycles import presets
|
|||||||
|
|
||||||
class CyclesRender(bpy.types.RenderEngine):
|
class CyclesRender(bpy.types.RenderEngine):
|
||||||
bl_idname = 'CYCLES'
|
bl_idname = 'CYCLES'
|
||||||
bl_label = "Cycles"
|
bl_label = "Cycles Render"
|
||||||
bl_use_shading_nodes = True
|
bl_use_shading_nodes = True
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@@ -99,6 +99,9 @@ static float get_node_output_value(BL::Node b_node, const string& name)
|
|||||||
|
|
||||||
static void get_tex_mapping(TextureMapping *mapping, BL::TexMapping b_mapping)
|
static void get_tex_mapping(TextureMapping *mapping, BL::TexMapping b_mapping)
|
||||||
{
|
{
|
||||||
|
if(!b_mapping)
|
||||||
|
return;
|
||||||
|
|
||||||
mapping->translation = get_float3(b_mapping.location());
|
mapping->translation = get_float3(b_mapping.location());
|
||||||
mapping->rotation = get_float3(b_mapping.rotation());
|
mapping->rotation = get_float3(b_mapping.rotation());
|
||||||
mapping->scale = get_float3(b_mapping.scale());
|
mapping->scale = get_float3(b_mapping.scale());
|
||||||
@@ -110,6 +113,9 @@ static void get_tex_mapping(TextureMapping *mapping, BL::TexMapping b_mapping)
|
|||||||
|
|
||||||
static void get_tex_mapping(TextureMapping *mapping, BL::ShaderNodeMapping b_mapping)
|
static void get_tex_mapping(TextureMapping *mapping, BL::ShaderNodeMapping b_mapping)
|
||||||
{
|
{
|
||||||
|
if(!b_mapping)
|
||||||
|
return;
|
||||||
|
|
||||||
mapping->translation = get_float3(b_mapping.location());
|
mapping->translation = get_float3(b_mapping.location());
|
||||||
mapping->rotation = get_float3(b_mapping.rotation());
|
mapping->rotation = get_float3(b_mapping.rotation());
|
||||||
mapping->scale = get_float3(b_mapping.scale());
|
mapping->scale = get_float3(b_mapping.scale());
|
||||||
|
@@ -97,11 +97,7 @@ __device_inline void bvh_node_intersect(KernelGlobals *kg,
|
|||||||
float c1loz = nz.z * idir.z - ood.z;
|
float c1loz = nz.z * idir.z - ood.z;
|
||||||
float c1hiz = nz.w * idir.z - ood.z;
|
float c1hiz = nz.w * idir.z - ood.z;
|
||||||
|
|
||||||
float c0min_x = min(c0lox, c0hix);
|
float c0min = max4(min(c0lox, c0hix), min(c0loy, c0hiy), min(c0loz, c0hiz), 0.0f);
|
||||||
float c0min_y = min(c0loy, c0hiy);
|
|
||||||
float c0min_z = min(c0loz, c0hiz);
|
|
||||||
|
|
||||||
float c0min = max4(c0min_x, c0min_y, c0min_z, 0.0f);
|
|
||||||
float c0max = min4(max(c0lox, c0hix), max(c0loy, c0hiy), max(c0loz, c0hiz), t);
|
float c0max = min4(max(c0lox, c0hix), max(c0loy, c0hiy), max(c0loz, c0hiz), t);
|
||||||
float c1lox = n1xy.x * idir.x - ood.x;
|
float c1lox = n1xy.x * idir.x - ood.x;
|
||||||
float c1hix = n1xy.y * idir.x - ood.x;
|
float c1hix = n1xy.y * idir.x - ood.x;
|
||||||
|
@@ -115,12 +115,12 @@ __device_inline double min(double a, double b)
|
|||||||
|
|
||||||
__device_inline float min4(float a, float b, float c, float d)
|
__device_inline float min4(float a, float b, float c, float d)
|
||||||
{
|
{
|
||||||
return min(min(min(a, b), c), d);
|
return min(min(a, b), min(c, d));
|
||||||
}
|
}
|
||||||
|
|
||||||
__device_inline float max4(float a, float b, float c, float d)
|
__device_inline float max4(float a, float b, float c, float d)
|
||||||
{
|
{
|
||||||
return max(max(max(a, b), c), d);
|
return max(max(a, b), max(c, d));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __KERNEL_OPENCL__
|
#ifndef __KERNEL_OPENCL__
|
||||||
|
Reference in New Issue
Block a user