Blender Git Loki

Git Commits -> Revision e439892

January 20, 2017, 10:24 (GMT)
Cycles: Don't run full shader evaluation for constant emission lamps

Most of the time, Lamps in Cycles are just a constant emission closure, no texturing etc. Therefore, running a full shader evaluation is wasteful.
To avoid that, Cycles now detects these constant emission shaders and stores their value in the lamp data along with a flag in the shader.
Then, at runtime, if this flag is set, the lamp code just uses this value and only runs the full shader evaluation if it is neccessary.

In scenes with a lot of lamps and with "Sample all direct/indirect" enabled, this saves up to 20% of rendering time in my tests.

Reviewers: #cycles

Differential Revision: https://developer.blender.org/D2193

Commit Details:

Full Hash: e439892b143534cc8bce5b6d3df0c3b98f0fd226
Parent Commit: c9dd9fc
Committed By: Sergey Sharybin
Lines Changed: +41, -6

5 Modified Paths:

/intern/cycles/kernel/kernel_emission.h (+6, -0) (Diff)
/intern/cycles/kernel/kernel_types.h (+2, -1) (Diff)
/intern/cycles/render/light.cpp (+7, -5) (Diff)
/intern/cycles/render/shader.cpp (+22, -0) (Diff)
/intern/cycles/render/shader.h (+4, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021