[Bf-committers] Shading System Proposals
mierle at gmail.com
Tue Dec 1 18:37:35 CET 2009
On Mon, Nov 30, 2009 at 6:46 AM, Brecht Van Lommel <brecht at blender.org> wrote:
> I've written down a proposal for the shading system refactor:
> It's quite technical. This page has more details on some of the things
> Matt has also been investigating this, there's some overlap in topics
> but he has much more detail on various topics:
> So, feedback is welcome, in particular on the design and issues listed
> at the end of the page. As you can see we are looking at this from a
> production rendering and physically based rendering point of view,
> trying to find a nice synthesis of both.
This should not be included in the current proposal, but consider the following:
1. Python is moving to LLVM & Clang via unladen swallow.
2. Blender links to Python.
3. Therefore, Blender will eventually link to LLVM & Clang.
Since LLVM & clang are production class compilers, we should keep the
door open for compiling node trees. This won't require a new shading
language; if clang were leveraged, we would just create the relevant C
snippet and compile it at runtime. It would be relatively easy to make
some test cases to ensure that the resulting compiled node tree is
sufficiently fast to justify the effort.
With OpenCL starting to be a reality, it is sensible to start
considering leveraging it too. Note that LLVM has an OpenCL backend as
well, though it is quite alpha.
More information about the Bf-committers