This inconsistency drove me totally crazy, it's really confusing
when it's inconsistent especially when you work on both Cycles and
Blender sides.
Shouldn;t cause merge PITA, it's whitespace changes only, Git should
be able to merge it nicely.
This commit contains all the tweaks which were missing in initial patch
re-integration from the standalone Cycles repository.
This commit also contains an utility cmake macro to help linking targets
with different libraries for release/debug builds, the name currently is
target_link_libraries_decoupled
it gets a target and list of libraries and makes sure debug builds are
using libraries with "_d" suffix.
After all this changes it'll hopefully be easier to interchange patches
between blender and standalone repositories, because they're now quite
identical.
Made it a dedicated macro to link release/debug targets against lib/lib_d
libraries which helps keeping code a bit more clean.
Also made it so MSVC is now happy about building debug Cycles with OSL
support.
Reshuffled code a bit and put some comments about what's going on, which
should make it a bit more clear.
This applies to an application comiling from the standalone Cycles repository
only.
There's still lack of proper install target, so currently pthreads
library is to be copied next to cycles.exe manually.
This is what was handy troubleshooting issues in the studio,
plus this is exactly the same thing which would be helpful
when solving issues with paths to compiled shaders and cubins
for standalone repository.
Basic idea is to check whether OIIO is compiled with embedded PugiXML parser
and if so use PugiXML from OIIO, otherwise find a standalone PugiXML library.
Thanks for Aldo Zang for the help with the fix for the panorama/fisheye
depth of field calculation and the overall math.
Reviewed By: sergey, dingto
Subscribers: juicyfruit, gregzaal, #cycles, dingto, matray
Differential Revision: https://developer.blender.org/D753
For now it was mainly about OpenCL wrangler being duplicated
between Cycles and Compositor, but with OpenSubdiv work those
wranglers were gonna to be duplicated just once again.
This commit makes it so Cycles and Compositor uses wranglers
from this repositories:
- https://github.com/CudaWrangler/cuew
- https://github.com/OpenCLWrangler/clew
This repositories are based on the wranglers we used before
and they'll be likely continued maintaining by us plus some
more players in the market.
Pretty much straightforward change with some tricks in the
CMake/SCons to make this libs being passed to the linker
after all other libraries in order to make OpenSubdiv linked
against those wranglers in the future.
For those who're worrying about Cycles being less standalone,
it's not truth, it's rather more flexible now and in the future
different wranglers might be used in Cycles. For now it'll
just mean those libs would need to be put into Cycles repository
together with some other libs from Blender such as mikkspace.
This is mainly platform maintenance commit, should not be any
changes to the user space.
Reviewers: juicyfruit, dingto, campbellbarton
Reviewed By: juicyfruit, dingto, campbellbarton
Differential Revision: https://developer.blender.org/D707
* Ashikhmin-Shirley anisotropic BSDF was added as closure
* Anisotropic BSDF node now has two distributions
Reviewers: brecht, dingto
Differential Revision: https://developer.blender.org/D549
added in rB74518b28267e9b18199212fbaa3c689fa018d20c.
No special bind/unbind needed for standalone viewer, so can just use a
static stub in the display callback.
reader.
To make a generic OSL shader connectable to other nodes, the parameters
must be declared via "input" and "output" child elements:
<osl_shader name="tex" src="./osl/stripes.osl">
<input name="Stripes" type="int" />
<output name="ColorOut" type="color" />
</osl_shader>
`name` must be the same as the OSL shader parameter name.
`type` must be one of float, int, color, vector, point, normal, closure,
string (matching cycles socket types)
Beyond this the OSL script nodes then work just like all other nodes.
OSL parameter sockets can be connected to other cycles nodes:
<connect from="checker color" to="tex Stripes" />
<connect from="tex ColorOut" to="floor_closure color" />
They can set default values for the input sockets by attributes of the
main node element:
<osl_shader name="tex" src="./osl/stripes.osl" Stripes="3" >
<input name="Stripes" type="int" />
<output name="ColorOut" type="color" />
</osl_shader>
This system of specifying custom attributes should probably be changed,
since it can easily create name conflicts and arbitrarily long elements.
But that is a different issue to be solved for all nodes in general.
Indirect and Direct samples can now be clamped individually. This way we can clamp the indirect samples (fireflies), while keeping the direct highlights.
Example render: http://www.pasteall.org/pic/show.php?id=66586
WARNING: This breaks backwards compatibility. If you had Clamping enabled in an old file, you must re-enable either Direct/Indirect clamping or both again.
Reviewed by: brecht
Differential Revision: https://developer.blender.org/D303