Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-26Cycles: remove prefix from source code file namesBrecht Van Lommel
Remove prefix of filenames that is the same as the folder name. This used to help when #includes were using individual files, but now they are always relative to the cycles root directory and so the prefixes are redundant. For patches and branches, git merge and rebase should be able to detect the renames and move over code to the right file.
2021-10-26Cycles: changes to source code folders structureBrecht Van Lommel
* Split render/ into scene/ and session/. The scene/ folder now contains the scene and its nodes. The session/ folder contains the render session and associated data structures like drivers and render buffers. * Move top level kernel headers into new folders kernel/camera/, kernel/film/, kernel/light/, kernel/sample/, kernel/util/ * Move integrator related kernel headers into kernel/integrator/ * Move OSL shaders from kernel/shaders/ to kernel/osl/shaders/ For patches and branches, git merge and rebase should be able to detect the renames and move over code to the right file.
2021-02-17Cycles: add utility functions for zero float2/float3/float4/transformBrecht Van Lommel
Ref D8237, T78710
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2020-11-04Cycles API: encapsulate Node socket membersKévin Dietrich
This encapsulates Node socket members behind a set of specific methods; as such it is no longer possible to directly access Node class members from exporters and parts of Cycles. The methods are defined via the NODE_SOCKET_API macros in `graph/ node.h`, and are for getting or setting a specific socket's value, as well as querying or modifying the state of its update flag. The setters will check whether the value has changed and tag the socket as modified appropriately. This will let us know how a Node has changed and what to update, which is the first concrete step toward a more granular scene update system. Since the setters will tag the Node sockets as modified when passed different data, this patch also removes the various modified methods on Nodes in favor of Node::is_modified which checks the sockets' update flags status. Reviewed By: brecht Maniphest Tasks: T79174 Differential Revision: https://developer.blender.org/D8544
2020-10-27Revert "Cycles API: encapsulate Node socket members"Brecht Van Lommel
This reverts commit 527f8b32b32187f754e5b176db6377736f9cb8ff. It is causing motion blur test failures and crashes in some renders, reverting until this is fixed.
2020-10-27Cycles API: encapsulate Node socket membersKévin Dietrich
This encapsulates Node socket members behind a set of specific methods; as such it is no longer possible to directly access Node class members from exporters and parts of Cycles. The methods are defined via the NODE_SOCKET_API macros in `graph/ node.h`, and are for getting or setting a specific socket's value, as well as querying or modifying the state of its update flag. The setters will check whether the value has changed and tag the socket as modified appropriately. This will let us know how a Node has changed and what to update, which is the first concrete step toward a more granular scene update system. Since the setters will tag the Node sockets as modified when passed different data, this patch also removes the various `modified` methods on Nodes in favor of `Node::is_modified` which checks the sockets' update flags status. Reviewed By: brecht Maniphest Tasks: T79174 Differential Revision: https://developer.blender.org/D8544
2020-09-04CMake: refresh building and external library handling of Cycles standaloneBrecht Van Lommel
* Support precompiled libraries on Linux * Add license headers * Refactoring to deduplicate code Includes work by Ray Molenkamp and Grische for precompiled libraries. Ref D8769
2019-09-13Cleanup: compiler warningsBrecht Van Lommel
2019-08-30Cleanup: clang-format, spellingCampbell Barton
2019-08-27Cycles: Stitching of subdivided and displaced meshesMai Lavelle
This patch stitches the vertices along patch edges so that cracks can no longer form when applying subdivision or displacement a mesh. Subpatches are now formed in a way that ensures vertex indices along subpatch edges are equal for adjacent subpatches. A mapping of vertices along patch edges is built to preform stitching. Overall performance is roughly the same, some gains were made in splitting, but some was lost in stitching. This fixes: - T49049 (cracks between patches from material and uv seams) - T49048 (discontinuous normals with true displacement) Reviewers: sergey, brecht Differential Revision: https://developer.blender.org/D3692
2019-08-21Shading: Add more operators to Vector Math node.OmarSquircleArt
Add Multiply, Divide, Project, Reflect, Distance, Length, Scale, Snap, Floor, Ceil, Modulo, Fraction, Absolute, Minimum, and Maximum operators to the Vector Math node. The Value output has been removed from operators whose output is a vector, and the other way around. All of those removals has been handled properly in versioning code. The patch doesn't include tests for the new operators. Tests will be added in a later patch. Reviewers: brecht, JacquesLucke Differential Revision: https://developer.blender.org/D5523
2019-06-12Cleanup: spelling in commentsCampbell Barton
2019-05-01Cleanup: comments (long lines) in cyclesCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-16CMake: cleanup, arg rename, add definitions lastCampbell Barton
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2018-11-09Cycles: Cleanup, space after (void)Sergey Sharybin
It was used in like 95% of places.
2018-11-09Cycles: Cleanup, split array from vectorSergey Sharybin
Those are similar but different types, no reason to keep their definitions in a single file.
2018-11-09Cycles: Cleanup, spacing after preprocessorSergey Sharybin
It is supposed to be two spaces before comment stating which if else/endif statements corresponds to. Was mainly violated in the header guards.
2018-07-06Cleanup: strip trailing space for cyclesCampbell Barton
2018-02-04msvc: Use source folder structure for project file.Ray Molenkamp
This patch changes the huge list of projects in visual studio into a nice tree matching the source folder structure. see D2823 for details. Differential Revision: http://developer.blender.org/D2823
2018-01-19Cycles: Remove unneeded include statementsSergey Sharybin
Also try to move them from headers to implementation files as much as possible.
2017-03-29Cycles: Make all #include statements relative to cycles source directorySergey Sharybin
The idea is to make include statements more explicit and obvious where the file is coming from, additionally reducing chance of wrong header being picked up. For example, it was not obvious whether bvh.h was refferring to builder or traversal, whenter node.h is a generic graph node or a shader node and cases like that. Surely this might look obvious for the active developers, but after some time of not touching the code it becomes less obvious where file is coming from. This was briefly mentioned in T50824 and seems @brecht is fine with such explicitness, but need to agree with all active developers before committing this. Please note that this patch is lacking changes related on GPU/OpenCL support. This will be solved if/when we all agree this is a good idea to move forward. Reviewers: brecht, lukasstockner97, maiself, nirved, dingto, juicyfruit, swerner Reviewed By: lukasstockner97, maiself, nirved, dingto Subscribers: brecht Differential Revision: https://developer.blender.org/D2586
2016-10-24Cycles: Cleanup, styleSergey Sharybin
2016-08-24Cycles Standalone: Fix support for subdivision meshesMai Lavelle
Changes from microdisplacement work broke previous support for subdivision meshes, sometimes leading to crashes; this makes things work again. Files that contain "patch" nodes will need to be updated to use meshes instead, as specifying patches was both inefficient and completely unsupported by the new subdivision code.
2016-08-18Code cleanup to use array.data() rather than &array[0]Brecht Van Lommel
(Now without the build errors)
2016-08-18Revert "Code cleanup to use array.data() rather than &array[0]."Mai Lavelle
This reverts commit 40b367479c6fe23d6f2b6d822f2d5266485619f3. Didn't build or solve any known issue. Please don't push changes without testing them first.
2016-08-18Code cleanup to use array.data() rather than &array[0].Brecht Van Lommel
These latter can cause MSVC debug asserts if the array is empty. With C++11 we'll be able to do this for std::vector later. This hopefully fixes an assert in the Cycles subdivision code.
2016-08-14Cycles microdisplacement: Move call to tessellate() from addon to CyclesMai Lavelle
By calling `tessellate()` from the mesh manager in Cycles we can do pre/post processing or even threaded tessellation without concerning client side code with the details.
2016-08-08Cycles: Quiet warning with WITH_OPENSUBDIV disabledJulian Eisel
Checked with @maiself, for now going with this simple solution.
2016-08-07Cycles microdisplacement: Support for Catmull-Clark subdivision via OpenSubdivMai Lavelle
Enables Catmull-Clark subdivision meshes with support for creases and attribute subdivision. Still waiting on OpenSubdiv to fully support face varying interpolation for subdividing uv coordinates tho. Also there may be some inconsistencies with Blender's subdivision which will be resolved at a later time. Code for reading patch tables and creating patch maps is borrowed from OpenSubdiv. Reviewed By: brecht Differential Revision: https://developer.blender.org/D2111
2016-07-29Cycles microdisplacement: ngons and attributes for subdivision meshesMai Lavelle
This adds support for ngons and attributes on subdivision meshes. Ngons are needed for proper attribute interpolation as well as correct Catmull-Clark subdivision. Several changes are made to achieve this: - new primitive `SubdFace` added to `Mesh` - 3 more textures are used to store info on patches from subd meshes - Blender export uses loop interface instead of tessface for subd meshes - `Attribute` class is updated with a simplified way to pass primitive counts around and to support ngons. - extra points for ngons are generated for O(1) attribute interpolation - curves are temporally disabled on subd meshes to avoid various bugs with implementation - old unneeded code is removed from `subd/` - various fixes and improvements Reviewed By: brecht Differential Revision: https://developer.blender.org/D2108
2016-06-07Cycles: Fix regression introduced in c96a4c8Mai Lavelle
A few places still needed to be updated to use the new Mesh::num_triangles() method; wrong number from triangles.size() was causing crashes.
2016-05-31Fix broken Cycles curve motion radius after recent refactor, and fix warnings.Brecht Van Lommel
2016-05-29Fix debug mode assert in subd code after recent refactoring.Brecht Van Lommel
2016-05-28Code refactor: modify mesh storage to use arrays rather than vectors, ↵Brecht Van Lommel
separate some arrays. Differential Revision: https://developer.blender.org/D2016
2016-05-22Code refactor: add generic Cycles node infrastructure.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D2016
2016-05-11Cycles: Use explicit qualifier for single-argument constructorsSergey Sharybin
Almost in all cases we want such constructors to be explicit, there are exceptions but only in few places.
2016-04-18Cycles microdisplacement: add max subdivision settingMai Lavelle
This is to prevent situations such as when the camera gets very close to a mesh and causes it to be tessellated into an excessive amount of micropolygons. In REYES this is known as the eye-splits problem. Reviewed By: brecht Differential Revision: https://developer.blender.org/D1922
2016-04-18Cycles microdisplacement: fix handling of triangles in DiagSplitMai Lavelle
Theres still more room for improvement but this makes things useable. Reviewed By: brecht Differential Revision: https://developer.blender.org/D1921
2016-04-13Cycles: Minor cleanup, whitespace around keyword and preprocessor indentSergey Sharybin
2016-04-13Cycles microdisplacement: preserve smooth normals for linear subdivisonMai Lavelle
This way we prevent cracks in the model due to discontinuous normals, by using smooth normals for displacement instead of always getting flat normals after linear subdivision. Reviewed By: brecht Differential Revision: https://developer.blender.org/D1916
2016-04-12Cycles microdisplacement: perform subdivision dicing in raster spaceMai Lavelle
NOTE: this is only the first of many patches towards completing the subdivison and displacement system in Cycles. These patches will be reviewed and committed one by one over the coming weeks. Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D1909
2016-02-03Cycles: Correction to asserts, they will never trigger beforeSergey Sharybin
2016-02-03Cycles: Cleanup, indentation and bracesSergey Sharybin
2016-01-14Cycles: Reduce scope of some defines set in CMakeListsSergey Sharybin
Should be no functional changes at all, just speeds up re-compilation when some features needs to be disabled for development purposes. For example, when running lots of Valgrind it's handy to disable any GPU devices because otherwise you'll be wasting quite some time in the driver while enumerating devices. Reviewers: dingto, lukasstockner97, brecht, juicyfruit Differential Revision: https://developer.blender.org/D1730
2015-03-27Cycles: Code cleanup, spaces around keywordsSergey Sharybin
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.
2014-12-25Cleanup: Fix Cycles Apache header.Thomas Dinges
This was already mixed a bit, but the dot belongs there.
2014-11-08Add safe_normalize to cycles, avoid checking length firstCampbell Barton
This won't give any big speedup, just avoids redundant sqrtf and may be useful in future. Differential Revision: https://developer.blender.org/D880