Cycles code refactor: replace magic ~0 values in the code with defines.

This commit is contained in:
Brecht Van Lommel
2014-03-29 13:03:47 +01:00
parent 6997908afc
commit e8b1cfed0a
26 changed files with 129 additions and 126 deletions

View File

@@ -266,7 +266,7 @@ ccl_device_inline float3 camera_world_to_ndc(KernelGlobals *kg, ShaderData *sd,
{
if(kernel_data.cam.type != CAMERA_PANORAMA) {
/* perspective / ortho */
if(sd->object == ~0 && kernel_data.cam.type == CAMERA_PERSPECTIVE)
if(sd->object == PRIM_NONE && kernel_data.cam.type == CAMERA_PERSPECTIVE)
P += camera_position(kg);
Transform tfm = kernel_data.cam.worldtondc;
@@ -276,7 +276,7 @@ ccl_device_inline float3 camera_world_to_ndc(KernelGlobals *kg, ShaderData *sd,
/* panorama */
Transform tfm = kernel_data.cam.worldtocamera;
if(sd->object != ~0)
if(sd->object != OBJECT_NONE)
P = normalize(transform_point(&tfm, P));
else
P = normalize(transform_direction(&tfm, P));