Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/types.h
| Show First 20 Lines • Show All 992 Lines • ▼ Show 20 Lines | |||||
| struct { | struct { | ||||
| float pad; | float pad; | ||||
| float size; | float size; | ||||
| } lamp; | } lamp; | ||||
| }; | }; | ||||
| } KernelLightDistribution; | } KernelLightDistribution; | ||||
| static_assert_align(KernelLightDistribution, 16); | static_assert_align(KernelLightDistribution, 16); | ||||
| typedef struct KernelLightTreeNode { | |||||
| /* Bounding box. */ | |||||
| float bounding_box_min[3]; | |||||
| float bounding_box_max[3]; | |||||
| /* Bounding cone. */ | |||||
| float bounding_cone_axis[3]; | |||||
| float theta_o; | |||||
| float theta_e; | |||||
| /* Energy. */ | |||||
| float energy; | |||||
| /* If this is 0 or less, we're at a leaf node | |||||
| * and the negative value indexes into the first child of the light array. | |||||
| * Otherwise, it's an index to the node's second child. */ | |||||
| int child_index; | |||||
| union { | |||||
| int num_prims; /* leaf nodes need to know the number of primitives stored. */ | |||||
| float energy_variance; /* interior nodes use the energy variance for the splitting heuristic. */ | |||||
| }; | |||||
| /* Bit trail. */ | |||||
| uint bit_trail; | |||||
| /* Padding. */ | |||||
| int pad1; | |||||
| } KernelLightTreeNode; | |||||
| static_assert_align(KernelLightTreeNode, 16); | |||||
| typedef struct KernelLightTreeEmitter { | |||||
| /* Bounding box. */ | |||||
| float bounding_box_min[3]; | |||||
| float bounding_box_max[3]; | |||||
| /* Bounding cone. */ | |||||
| float bounding_cone_axis[3]; | |||||
| float theta_o; | |||||
| float theta_e; | |||||
| /* Energy. */ | |||||
| float energy; | |||||
| /* prim_id denotes the location in the lights or triangles array. */ | |||||
| int prim_id; | |||||
| union { | |||||
| struct { | |||||
| int shader_flag; | |||||
| int object_id; | |||||
| } mesh_light; | |||||
| struct { | |||||
| float pad; | |||||
| float size; | |||||
| } lamp; | |||||
| }; | |||||
| /* Parent. */ | |||||
| int parent_index; | |||||
| } KernelLightTreeEmitter; | |||||
| static_assert_align(KernelLightTreeEmitter, 16); | |||||
| typedef struct KernelLightTreeDistantEmitter { | |||||
| /* Direction from world to light. */ | |||||
| float direction[3]; | |||||
| /* Size of light (in radians). */ | |||||
| float bounding_radius; | |||||
| /* Energy. */ | |||||
| float energy; | |||||
| /* Prim ID. */ | |||||
| int prim_id; | |||||
| /* Padding. */ | |||||
| int pad1, pad2; | |||||
| } KernelLightTreeDistantEmitter; | |||||
| static_assert_align(KernelLightTreeDistantEmitter, 16); | |||||
| typedef struct KernelParticle { | typedef struct KernelParticle { | ||||
| int index; | int index; | ||||
| float age; | float age; | ||||
| float lifetime; | float lifetime; | ||||
| float size; | float size; | ||||
| float4 rotation; | float4 rotation; | ||||
| /* Only xyz are used of the following. float4 instead of float3 are used | /* Only xyz are used of the following. float4 instead of float3 are used | ||||
| * to ensure consistent padding/alignment across devices. */ | * to ensure consistent padding/alignment across devices. */ | ||||
| ▲ Show 20 Lines • Show All 238 Lines • Show Last 20 Lines | |||||