Cleanup: format
This commit is contained in:
parent
9a1ab6bd14
commit
f240a16037
|
@ -303,7 +303,7 @@ void BVHEmbree::set_tri_vertex_buffer(RTCGeometry geom_id, const Mesh *mesh, con
|
|||
int t_ = (t > t_mid) ? (t - 1) : t;
|
||||
verts = &attr_mP->data_float3()[t_ * num_verts];
|
||||
}
|
||||
|
||||
|
||||
if (update) {
|
||||
rtcUpdateGeometryBuffer(geom_id, RTC_BUFFER_TYPE_VERTEX, t);
|
||||
}
|
||||
|
|
|
@ -145,8 +145,8 @@ ccl_device_inline float3 triangle_point_from_uv(KernelGlobals kg,
|
|||
{
|
||||
const uint3 tri_vindex = kernel_data_fetch(tri_vindex, isect_prim);
|
||||
const float3 tri_a = kernel_data_fetch(tri_verts, tri_vindex.x),
|
||||
tri_b = kernel_data_fetch(tri_verts, tri_vindex.y),
|
||||
tri_c = kernel_data_fetch(tri_verts, tri_vindex.z);
|
||||
tri_b = kernel_data_fetch(tri_verts, tri_vindex.y),
|
||||
tri_c = kernel_data_fetch(tri_verts, tri_vindex.z);
|
||||
|
||||
/* This appears to give slightly better precision than interpolating with w = (1 - u - v). */
|
||||
float3 P = tri_a + u * (tri_b - tri_a) + v * (tri_c - tri_a);
|
||||
|
|
|
@ -767,8 +767,8 @@ void Mesh::pack_verts(packed_float3 *tri_verts,
|
|||
}
|
||||
for (size_t i = 0; i < triangles_size; i++) {
|
||||
tri_vindex[i] = make_packed_uint3(p_tris[off + 0] + vert_offset,
|
||||
p_tris[off + 1] + vert_offset,
|
||||
p_tris[off + 2] + vert_offset);
|
||||
p_tris[off + 1] + vert_offset,
|
||||
p_tris[off + 2] + vert_offset);
|
||||
tri_patch[i] = triangle_patch[i] * 8 + patch_offset;
|
||||
off += 3;
|
||||
}
|
||||
|
|
|
@ -62,14 +62,16 @@ struct packed_int3 {
|
|||
|
||||
ccl_device_inline_method packed_int3(){};
|
||||
|
||||
ccl_device_inline_method packed_int3(const int px, const int py, const int pz) : x(px), y(py), z(pz) {};
|
||||
ccl_device_inline_method packed_int3(const int px, const int py, const int pz)
|
||||
: x(px), y(py), z(pz){};
|
||||
|
||||
ccl_device_inline_method packed_int3(const int3 &a) : x(a.x), y(a.y), z(a.z)
|
||||
{
|
||||
}
|
||||
|
||||
ccl_device_inline_method operator int3() const {
|
||||
return make_int3(x,y,z);
|
||||
|
||||
ccl_device_inline_method operator int3() const
|
||||
{
|
||||
return make_int3(x, y, z);
|
||||
}
|
||||
|
||||
ccl_device_inline_method packed_int3 &operator=(const int3 &a)
|
||||
|
|
|
@ -34,14 +34,16 @@ struct packed_uint3 {
|
|||
|
||||
ccl_device_inline_method packed_uint3(){};
|
||||
|
||||
ccl_device_inline_method packed_uint3(const uint px, const uint py, const uint pz) : x(px), y(py), z(pz) {};
|
||||
ccl_device_inline_method packed_uint3(const uint px, const uint py, const uint pz)
|
||||
: x(px), y(py), z(pz){};
|
||||
|
||||
ccl_device_inline_method packed_uint3(const uint3 &a) : x(a.x), y(a.y), z(a.z)
|
||||
{
|
||||
}
|
||||
|
||||
ccl_device_inline_method operator uint3() const {
|
||||
return make_uint3(x,y,z);
|
||||
|
||||
ccl_device_inline_method operator uint3() const
|
||||
{
|
||||
return make_uint3(x, y, z);
|
||||
}
|
||||
|
||||
ccl_device_inline_method packed_uint3 &operator=(const uint3 &a)
|
||||
|
|
|
@ -819,8 +819,8 @@ static int delete_soft(const char *file, const char **error_message)
|
|||
|
||||
Class NSStringClass = objc_getClass("NSString");
|
||||
SEL stringWithUTF8StringSel = sel_registerName("stringWithUTF8String:");
|
||||
id pathString = ((id(*)(Class, SEL, const char *))objc_msgSend)(
|
||||
NSStringClass, stringWithUTF8StringSel, file);
|
||||
id pathString = ((
|
||||
id(*)(Class, SEL, const char *))objc_msgSend)(NSStringClass, stringWithUTF8StringSel, file);
|
||||
|
||||
Class NSFileManagerClass = objc_getClass("NSFileManager");
|
||||
SEL defaultManagerSel = sel_registerName("defaultManager");
|
||||
|
@ -831,8 +831,8 @@ static int delete_soft(const char *file, const char **error_message)
|
|||
id nsurl = ((id(*)(Class, SEL, id))objc_msgSend)(NSURLClass, fileURLWithPathSel, pathString);
|
||||
|
||||
SEL trashItemAtURLSel = sel_registerName("trashItemAtURL:resultingItemURL:error:");
|
||||
BOOL deleteSuccessful = ((BOOL(*)(id, SEL, id, id, id))objc_msgSend)(
|
||||
fileManager, trashItemAtURLSel, nsurl, nil, nil);
|
||||
BOOL deleteSuccessful = ((
|
||||
BOOL(*)(id, SEL, id, id, id))objc_msgSend)(fileManager, trashItemAtURLSel, nsurl, nil, nil);
|
||||
|
||||
if (deleteSuccessful) {
|
||||
ret = 0;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
void main()
|
||||
{
|
||||
fragColor = texture(image_texture, texCoord_interp);
|
||||
fragColor = texture(image_texture, texCoord_interp);
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
|
||||
vec2 normalize_coordinates()
|
||||
{
|
||||
return (vec2(2.0) * (pos / fullscreen)) - vec2(1.0);
|
||||
return (vec2(2.0) * (pos / fullscreen)) - vec2(1.0);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(normalize_coordinates(), 0.0, 1.0);
|
||||
texCoord_interp = texCoord;
|
||||
gl_Position = vec4(normalize_coordinates(), 0.0, 1.0);
|
||||
texCoord_interp = texCoord;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue