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
2017-05-20Cycles: Cleanup, style and unused argumentsSergey Sharybin
- Some arguments were inapproriatry tagged as unused using (void)foo semantic. Only use such semantic in tricky casses, when something needs to be ignored in release builds or something is dependent on tricky ifndef policy. For rest of the cases just use void foo(int /bar*/) semantic, which ensures variable is not used. Solves confusion and code running out of sync with later development. - Used proper unused semantic to some arguments. - Added braces to make code easier to follow, tricky indentation with ifdef, uh.
2017-05-19Fix T51553: Cycles Volume Emission turns black when strength is 0 or color ↵Lukas Stockner
is black The problem was that Cycles implicitly uses a transparent surface shader when only volume nodes are used, but since the black emission shader gets optimized away, it was no longer detected and therefore no transparent surface was used. Therefore, the shader now stores whether volume nodes were connected before optimizing.
2017-04-26Cycles: Fix access undefined macro on non-MSVC compilerSergey Sharybin
Also rremove trailing whitespace.
2017-04-25workaround for T50176lazydodo
This works around a long outstanding issue T50176 with cycles on msvc2015/x86 . root cause is still unknown though,feels like a game of whack'a'mole Reviewers: sergey, dingto Subscribers: Blendify Tags: #cycles Differential Revision: https://developer.blender.org/D2573
2017-04-21Cycles: Solve speed regression of classroom scene after principled commitSergey Sharybin
This way we can skip it from compiling into OpenCL kernels by making this shader compile-time feature.
2017-04-10Cycles: Fix race condition in shader attribute for real nowSergey Sharybin
Ended up moving lock in the more centralized space since multiple shaders can access this map.
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-12-09Land D2339 by bliblu blilazydodo
2016-09-14Cycles: Also support the constant emission speedup for mesh lightsLukas Stockner
Reviewers: brecht, sergey, dingto, juicyfruit Differential Revision: https://developer.blender.org/D2220
2016-09-09Cycles: Don't run full shader evaluation for constant emission lampsLukas Stockner
Most of the time, Lamps in Cycles are just a constant emission closure, no texturing etc. Therefore, running a full shader evaluation is wasteful. To avoid that, Cycles now detects these constant emission shaders and stores their value in the lamp data along with a flag in the shader. Then, at runtime, if this flag is set, the lamp code just uses this value and only runs the full shader evaluation if it is neccessary. In scenes with a lot of lamps and with "Sample all direct/indirect" enabled, this saves up to 20% of rendering time in my tests. Reviewers: #cycles Differential Revision: https://developer.blender.org/D2193
2016-09-08Cycles: Fix OpenCL speed regression introduced with the improved bump mappingLukas Stockner
The two SVM nodes added with e7ea1ae78c caused a slowdown on AMD cards when rendering with OpenCL, whether displacement was used or not. In the Barcelona Pavillon scene on a RX480, this would cause a 12% slowdown. Therefore, this commit adds a additional flag for feature-adaptive compilation so that the new SVM nodes are only enabled when they are needed (Node tree connected to the Displacement output and Displacement type set to Both). Also, the nodes were also added to shaders when the Displacement Type was set to Bump (the default), which was unneccessary and is fixed now. Thanks to linda2 on IRC for reporting and testing and to maiself for help with the displacement shader code. This fix might be relevant for 2.78, but it should be tested further before including it.
2016-09-02Fix T49180: Cycles MIS Map for Animated Environment Texture Movie Doesn't ↵Sergey Sharybin
Update on Frame Change Not really ideal fix at all, but we are at RC today, so better to play really safe.
2016-09-02Cycles microdisplacement: Improved automatic bump mappingMai Lavelle
Object coordinates can now be used in the displacement shader and will give correct results, where as before bump mapping was calculated from the displace positions and resulted in incorrect shading. This works by evaluating the shader in two parts, first bump then surface, and setting the shader state to match what it would be if the surface was undisplaced for the bump shader evaluation. Currently only `P` is set as if undisplaced, but other shader variables could be set as well, such as `I` or `time`. Since these aren't set to anything meaningful for displacement I left them out of this patch, we can decide what to do with them separately. Reviewed By: brecht Differential Revision: https://developer.blender.org/D2156
2016-09-02Cycles: Store undisplaced coordinates for meshes when neededMai Lavelle
Reviewed By: brecht Differential Revision: https://developer.blender.org/D2156
2016-09-02Cycles: remove duplicate shader storageMai Lavelle
Storing multiple copies of a shader was needed when the displacement method was a mesh option and could be different for each mesh. Now that its a shader option this is unnecessary. Reviewed By: brecht Differential Revision: https://developer.blender.org/D2156
2016-08-07Cycles microdisplacement: Move displacement options from mesh to material ↵Mai Lavelle
settings Displacement is now a per material setting, which means old files will have to be updated if they had used displacement. Cool side effect of this change is material previews now show displacement. Reviewed By: brecht Differential Revision: https://developer.blender.org/D2140
2016-06-11Cycles: nodify shader nodesBrecht Van Lommel
Differential Revision: https://developer.blender.org/D2038
2016-05-29Code refactor: pass ShaderInput to constant_fold, so it supports arbitrary ↵Brecht Van Lommel
types.
2016-05-28Code refactor: make ShaderNode match Node a bit more, reusing types and enums.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D2016
2016-05-22Fix Cycles compile errors with GCC due to double promotion as errors.Brecht Van Lommel
2016-05-22Code refactor: nodify Cycles shader and lights.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D2016
2016-05-17Code refactor: use shader pointers rather than shader indexes.Brecht Van Lommel
2016-05-08Cycles: Fix two small memory leaks and deduplicate table freeingLukas Stockner
This commit makes remove_table skip the freeing if the offset is already set to invalid - or, if it wasn't, set it to invalid after freeing. That's what the current code was already doing in the Manager classes, this change allows them to just call remove without the additional code. Also, two potential memory leaks where new tables were always allocated without freeing the old ones are fixed. Reviewers: sergey, dingto, brecht Differential Revision: https://developer.blender.org/D1974
2016-05-07Some fixes for CUDA runtime compile:Thomas Dinges
* When Baking wasn't used we got an error. * On top of Volume Nodes (NODES_FEATURE_VOLUME), we now also check if we need volume sampling code, so we can disable that as well and save some further compilation time.
2016-05-05Code refactor: reduce special node types, use generic constant folding.Brecht Van Lommel
2016-02-12Cycles: Always use guarded allocator of vectorsSergey Sharybin
We don't have vectors re-allocation happening multiple times from inside a loop anymore, so we can safely switch to a memory guarded allocator for vectors and keep track on the memory usage at various stages of rendering. Additionally, when building from inside Blender repository, Cycles will use Blender's guarded allocator, so actual memory usage will be displayed in the Space Info header. There are couple of tricky aspects of the patch: - TaskScheduler::exit() now explicitly frees memory used by `threads`. This is needed because `threads` is a static member which destructor isn't getting called on Blender's exit which caused memory leak print to happen. This shouldn't give any measurable speed issues, reallocation of that vector is only one of fewzillion other allocations happening during synchronization. - Use regular guarded malloc (not aligned one). No idea why it was made to be aligned in the first place. Perhaps some corner case tests or so. Vector was never expected to be aligned anyway. Let's see if we'll have actual bugs with this. Reviewers: dingto, lukasstockner97, juicyfruit, brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D1774
2016-02-06Cycles: Auto disable World MIS, if we only use a simple color.Thomas Dinges
When World MIS is enabled by the user, we now check if we actually need it. In case of a simple node setup (no procedurals, no HDRs..) we auto disable MIS internally to save render time. This change is important for upcoming default changes.
2016-02-05Cleanup: Rename has_heterogeneous_volume variable.Thomas Dinges
No functional changes, this change is done for consistency of upcoming changes.
2016-01-07Cycles: Fix wrong transparency flag being set to integratorSergey Sharybin
Patch from be28706 made it so integrator will use last shader's transparent shadow flag, which is wrong since last shader might not have transparent shadow while shaders prior to it might have one.
2016-01-07Cleanup: Fix Cycles compile warning on MSVC.Thomas Dinges
2015-11-21Cycles: Make requested features struct aware of subsurface BSDFSergey Sharybin
This way we'll be able to disable SSS for the scene-adaptive kernel.
2015-11-20Cycles: Fix filter glossy being broken after recent changesSergey Sharybin
Basically we can not use sharp closure as a substitude when filter glossy is used. This is because we can not blur sharp reflection/refraction. This is quite quick and not really clean implementation. Not really happy with manual handling of original settings, but this is as good as we can do in the quick patch. It's a good acknowledgment and we now can re-consider some aspects of graph simplification to make such cases more natively supported. P.S. This failure would have been shown by our regression tests, so please, bother a bit to run Cycles's test sweep before doing such optimizations.
2015-09-08Cycles: Update TODO, camera in volume is supported alreadySergey Sharybin
2015-09-08Fix T46045: Missing viewport update when adding transparent shader to materialSergey Sharybin
2015-06-01Cycles: Fix some typos in the selective modes compilationSergey Sharybin
2015-06-01Cycles: Fix missing features gathering from the bump graphSergey Sharybin
2015-06-01Cycles: Add bump feature for selective nodes compilationSergey Sharybin
For now it is unused in the kernel, actual usage will come with the next commits.
2015-05-14Cycles: Fix missing camera-in-volume update when using certain render layers ↵Sergey Sharybin
configurations
2015-05-09Cycles: Initial work towards selective nodes support compilationSergey Sharybin
The goal is to be able to compile kernel with nodes which are actually needed to render current scene, hence improving performance of the kernel, The idea is: - Have few node groups, starting with a group which contains nodes are used really often, and then couple of groups which will be extension of this one. - Have feature-based nodes disabling, so it's possible to disable nodes related to features which are not used with the currently used nodes group. This commit only lays down needed routines for this approach, actual split will happen later after gathering statistics from bunch of production scenes.
2015-05-05Cycles: Use curve approximation for blackbody instead of lookup tableSv. Lockal
Now we calculate color in range 800..12000 using an approximation a/x+bx+c for R and G and ((at + b)t + c)t + d) for B. Max absolute error for RGB for non-lut function is less than 0.0001, which is enough to get the same 8 bit/channel color as for OSL with a noticeable performance difference. However there is a slight visible difference between previous non-OSL implementation because of lookup table interpolation and offset-by-one mistake. The previous implementation gave black color outside of soft range (t > 12000), now it gives the same color as for 12000. Also blackbody node without input connected is being converted to value input at shader compile time. Reviewers: dingto, sergey Reviewed By: dingto Subscribers: nutel, brecht, juicyfruit Differential Revision: https://developer.blender.org/D1280
2015-04-26Cleanup: Update Lookup table comments.Thomas Dinges
2015-04-06Cycles: Experiment with making previews more interactiveSergey Sharybin
There were two major problems with the interactivity of material previews: - Beckmann tables were re-generated on every material tweak. This is because preview scene is not set to be persistent, so re-triggering the render leads to the full scene re-sync. - Images could take rather noticeable time to load with OIIO from the disk on every tweak. This patch addressed this two issues in the following way: - Beckmann tables are now static on CPU memory. They're couple of hundred kilobytes only, so wouldn't expect this to be an issue. And they're needed for almost every render anyway. This actually also makes blackbody table to be static, but it's even smaller than beckmann table. Not totally happy with this approach, but others seems to complicate things quite a bit with all this render engine life time and so.. - For preview rendering all images are considered to be built-in. This means instead of OIIO which re-loads images on every re-render they're coming from ImBuf cache which is fully manageable from blender side and unused images gets freed later. This would make it impossible to have mipmapping with OSL for now, but we'll be working on that later anyway and don't think mipmaps are really so crucial for the material preview. This seems to be a better alternative to making preview scene persistent, because of much optimal memory control from blender side. Reviewers: brecht, juicyfruit, campbellbarton, dingto Subscribers: eyecandy, venomgfx Differential Revision: https://developer.blender.org/D1132
2015-03-27Cycles: Code cleanup, make strict flags happy about disabled OSLSergey Sharybin
2015-03-27Cycles: Code cleanup, prepare for strict C++ flagsSergey Sharybin
2015-01-27Cycles: Support texture coordinate from another objectSergey Sharybin
This is the same as blender internal's texture mapping from another object, so this way it's possible to control texture space of one object by another. Quite straightforward change apart from the workaround for the stupidness of the dependency graph. Now shader has flag telling that it depends on object transform. This is the simplest way to know which shaders needs to be tagged for update when object changes. This might give some false-positive tags now but reducing them should not be priority for Cycles and rather be a priority to bring new dependency graph. Also GLSL preview does not support using other object for mapping. This is actually correct for BI shading as well and to be addressed as a part of general GLSL viewport improvements since it's not really clear how to support this in GLSL. Reviewers: brecht, juicyfruit Subscribers: eyecandy, venomgfx Differential Revision: https://developer.blender.org/D1021
2015-01-23Cycles: Don't re-generate blackbody/beckmann tables on every shaders updateSergey Sharybin
This commit makes it so blackbody and beckmann lookup tables are stored on CPU after being generated and then only being copied to the device if needed. This solves lag of viewport update when tweaking shader tree by using 266KB of CPU memory.
2015-01-19Fix T43311: using displacement shader crashes blenderSergey Sharybin
Issue was caused by wrong order of scene device update, which could lead to missing object flags in shader kernel. This patch solves a bit more than that making sure objects flags are always properly updated, so adding/removing volume BSDF will properly reflect on viewport where camera might become being in volume and so.
2014-12-25Cleanup: Fix Cycles Apache header.Thomas Dinges
This was already mixed a bit, but the dot belongs there.
2014-11-11Fix T41783: Cycles baking ignores displacementDalai Felinto
Create unique flag for output shaders with displacement data and use it to calculate transformed normal. Implementation suggested by Brecht Van Lommel. Reviewers: brecht Differential Revision: https://developer.blender.org/D890
2014-10-22Cycles: Get rid of hardcoded enum values in the codeSergey Sharybin
Still need to keep enum definition in sync with the python code, but the code itself is a bit more clear to understand now.