Proper Shadeless Shader in Cycles
Shadeless materials are useful for texture preview, rendering/baking masks, and various Non-Photorealistic Rendering techniques.
Currently, texture preview is normally done with an Emission shader, as this looks shadeless. However, emission shaders are slow to render. And in scenes, they will still cast light onto other objects. A proper shadeless shader would save time on view port previews when building materials, and open a whole new world of options for NPR users.
4 Comments
If you disable MIS for the material, the pure emission shader will be as fast as it gets. To avoid lighting the scene, you could mix the Emission with another BSDF with Is Camera as the mix factor.
Implementing a new BSDF isn't really possible with OSL, but you can get a real shadeless shader with this Is Camera-based mixing.
easier, connect the Light Path Node from the Is camera ray socket to your emmission's strength, and done, it renders blazing fast, and is only two nodes... btw, it's almos what the Node Wrangler does when you hit ctrl shift click on any node.
You should use an addition of Camera + Glossy ray for that, otherwise in any glossy material it would display the diffuse :
Emission shaders are quite fast, and the casted light issue can be resolved with the addition of some trivial additional nodes.