Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/light/triangle.h
| Show First 20 Lines • Show All 271 Lines • ▼ Show 20 Lines | if (!kernel_data.integrator.use_light_tree) { | ||||
| if (has_motion && area != 0.0f) { | if (has_motion && area != 0.0f) { | ||||
| /* For motion blur need area of triangle at fixed time as used in the CDF. */ | /* For motion blur need area of triangle at fixed time as used in the CDF. */ | ||||
| triangle_world_space_vertices(kg, object, prim, -1.0f, V); | triangle_world_space_vertices(kg, object, prim, -1.0f, V); | ||||
| distribution_area = triangle_area(V[0], V[1], V[2]); | distribution_area = triangle_area(V[0], V[1], V[2]); | ||||
| } | } | ||||
| ls->pdf_selection = distribution_area * kernel_data.integrator.distribution_pdf_triangles; | ls->pdf_selection = distribution_area * kernel_data.integrator.distribution_pdf_triangles; | ||||
| ls->pdf *= ls->pdf_selection; | |||||
| } | } | ||||
| return (ls->pdf > 0.0f); | return (ls->pdf > 0.0f); | ||||
| } | } | ||||
| template<bool in_volume_segment> | template<bool in_volume_segment> | ||||
| ccl_device_forceinline bool triangle_light_tree_parameters( | ccl_device_forceinline bool triangle_light_tree_parameters( | ||||
| KernelGlobals kg, | KernelGlobals kg, | ||||
| Show All 40 Lines | |||||