Blender Git Commit Log

Git Commits -> Revision e961684

January 20, 2017, 10:25 (GMT)
Cycles: Fix T49901: OpenCL build error after recent light texture coordinate commit

Basically, the problem here was that the transform that's used to bring texture coordinates
to world space is either fetched while setting up the shader (with Object Motion is enabled) or
fetched when needed (otherwise). That helps to save ShaderData memory on OpenCL when Object Motion isn't needed.

Now, if OM is enabled, the Lamp transform can just be stored inside the ShaderData as well. The original commit just assumed it is.
However, when it's not (on OpenCL by default, for example), there is no easy way to fetch it when needed, since the ShaderData doesn't
store the Lamp index.

So, for now the lamps just don't support local texture coordinates anymore when Object Motion is disabled.
To fix and support this properly, one of the following could be done:
- Just always pre-fetch the transform. Downside: Memory Usage increases when not using OM on OpenCL
- Add a variable to ShaderData that stores the Lamp ID to allow fetching it when needed
- Store the Lamp ID inside prim or object. Problem: Cycles currently checks these for whether an object was hit - these checks would need to be changed.
- Enable OM whenever a Texture Coordinate's Normal output is used. Downside: Might not actually be needed.

Commit Details:

Full Hash: e961684de58546e4332b32d096a358f500d92db4
Parent Commit: 74dc4ef
Committed By: Sergey Sharybin
Lines Changed: +14, -17

4 Modified Paths:

/intern/cycles/kernel/geom/geom_object.h (+8, -4) (Diff)
/intern/cycles/kernel/kernel_shader.h (+2, -5) (Diff)
/intern/cycles/kernel/svm/svm_image.h (+1, -2) (Diff)
/intern/cycles/kernel/svm/svm_tex_coord.h (+3, -6) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021