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
2020-03-24Cleanup: remove unused Cycles kernel feature flags, replace by node levelsBrecht Van Lommel
2020-03-11Fix Cycles incorrect result when compressing some 8 bit log colorspace imagesBrecht Van Lommel
Don't clamp and do premultiply after color space conversion.
2019-12-12Add support for tiled images and the UDIM naming schemeLukas Stockner
This patch contains the work that I did during my week at the Code Quest - adding support for tiled images to Blender. With this patch, images now contain a list of tiles. By default, this just contains one tile, but if the source type is set to Tiled, the user can add additional tiles. When acquiring an ImBuf, the tile to be loaded is specified in the ImageUser. Therefore, code that is not yet aware of tiles will just access the default tile as usual. The filenames of the additional tiles are derived from the original filename according to the UDIM naming scheme - the filename contains an index that is calculated as (1001 + 10*<y coordinate of the tile> + <x coordinate of the tile>), where the x coordinate never goes above 9. Internally, the various tiles are stored in a cache just like sequences. When acquired for the first time, the code will try to load the corresponding file from disk. Alternatively, a new operator can be used to initialize the tile similar to the New Image operator. The following features are supported so far: - Automatic detection and loading of all tiles when opening the first tile (1001) - Saving all tiles - Adding and removing tiles - Filling tiles with generated images - Drawing all tiles in the Image Editor - Viewing a tiled grid even if no image is selected - Rendering tiled images in Eevee - Rendering tiled images in Cycles (in SVM mode) - Automatically skipping loading of unused tiles in Cycles - 2D texture painting (also across tiles) - 3D texture painting (also across tiles, only limitation: individual faces can not cross tile borders) - Assigning custom labels to individual tiles (drawn in the Image Editor instead of the ID) - Different resolutions between tiles There still are some missing features that will be added later (see T72390): - Workbench engine support - Packing/Unpacking support - Baking support - Cycles OSL support - many other Blender features that rely on images Thanks to Brecht for the review and to all who tested the intermediate versions! Differential Revision: https://developer.blender.org/D3509
2019-08-26Cycles: change svm node decoding for more efficient code generation on GPUPatrick Mours
These functions no longer accept NULL. They were renamed for clarity and to avoid hidden merge issues. Ref D5363
2019-08-26Cycles: fixes for building kernel without certain featuresPatrick Mours
Ref D5363
2019-05-19Cleanup: refactor image texture node code for coming changesBrecht Van Lommel
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
2018-07-06Cleanup: strip trailing space for cyclesCampbell Barton
2018-06-14Cycles: Query XYZ to/from Scene Linear conversion from OCIO instead of ↵Lukas Stockner
assuming sRGB I've limited it to just the RGB<->XYZ stuff for now, correct image handling is the next step. Reviewers: brecht, sergey Differential Revision: https://developer.blender.org/D3478
2017-10-07Code refactor: make texture code more consistent between devices.Brecht Van Lommel
* Use common TextureInfo struct for all devices, except CUDA fermi. * Move image sampling code to kernels/*/kernel_*_image.h files. * Use arrays for data textures on Fermi too, so device_vector<Struct> works.
2017-09-06Fix T52652: Cycles image box mapping has flipped textures.Brecht Van Lommel
This breaks backwards compatibility some in that 3 sides will be mapped differently now, but difficult to avoid and can be considered a bugfix.
2017-07-20Cycles: fixed the SM_2x CUDA kernel build that I broke in my previous commitStefan Werner
2017-07-20Fix T52107: Color management difference when using multiple and different ↵Stefan Werner
GPUs together This commit unifies the flattened texture slot names for bindless and regular CUDA textures. Texture indices are now identical across all CUDA architectures, where before Fermi used different indices, which lead to problems when rendering on multi-GPU setups mixing Fermi with newer hardware.
2017-05-07Cycles: Implement denoising option for reducing noise in the rendered imageLukas Stockner
This commit contains the first part of the new Cycles denoising option, which filters the resulting image using information gathered during rendering to get rid of noise while preserving visual features as well as possible. To use the option, enable it in the render layer options. The default settings fit a wide range of scenes, but the user can tweak individual settings to control the tradeoff between a noise-free image, image details, and calculation time. Note that the denoiser may still change in the future and that some features are not implemented yet. The most important missing feature is animation denoising, which uses information from multiple frames at once to produce a flicker-free and smoother result. These features will be added in the future. Finally, thanks to all the people who supported this project: - Google (through the GSoC) and Theory Studios for sponsoring the development - The authors of the papers I used for implementing the denoiser (more details on them will be included in the technical docs) - The other Cycles devs for feedback on the code, especially Sergey for mentoring the GSoC project and Brecht for the code review! - And of course the users who helped with testing, reported bugs and things that could and/or should work better!
2017-05-03Cycles: Fix OpenCL compilation failure after recent color changesSergey Sharybin
It is really confusing to have some functions available in some devices and not on another devices.
2017-05-03Cycles: Simplify code in SVM image by using new utility functionSergey Sharybin
Can not measure any performance difference, so seems the code is identical and just shorter.
2017-04-27Unlimited number of textures for CyclesStefan Werner
This patch allows for an unlimited number of textures in Cycles where the hardware allows. It replaces a number static arrays with dynamic arrays and changes the way the flat_slot indices are calculated. Eventually, I'd like to get to a point where there are only flat slots left and textures off all kinds are stored in a single array. Note that the arrays in DeviceScene are changed from containing device_vector<T> objects to device_vector<T>* pointers. Ideally, I'd like to store objects, but dynamic resizing of a std:vector in pre-C++11 calls the copy constructor, which for a good reason is not implemented for device_vector. Once we require C++11 for Cycles builds, we can implement a move constructor for device_vector and store objects again. The limits for CUDA Fermi hardware still apply. Reviewers: tod_baudais, InsigMathK, dingto, #cycles Reviewed By: dingto, #cycles Subscribers: dingto, smellslikedonkey Differential Revision: https://developer.blender.org/D2650
2017-03-08Cycles: Remove ccl_fetch and SOAMai Lavelle
2017-02-15Cycles: Fix CUDA compilation error after recent changesSergey Sharybin
2016-11-03Cycles: Fix T49901: OpenCL build error after recent light texture coordinate ↵Lukas Stockner
commit Basically, the problem here was that the transform that's used to bring texture coordinates to world space is either fetched while setting up the shader (with Object Motion is enabled) or fetched when needed (otherwise). That helps to save ShaderData memory on OpenCL when Object Motion isn't needed. Now, if OM is enabled, the Lamp transform can just be stored inside the ShaderData as well. The original commit just assumed it is. However, when it's not (on OpenCL by default, for example), there is no easy way to fetch it when needed, since the ShaderData doesn't store the Lamp index. So, for now the lamps just don't support local texture coordinates anymore when Object Motion is disabled. To fix and support this properly, one of the following could be done: - Just always pre-fetch the transform. Downside: Memory Usage increases when not using OM on OpenCL - Add a variable to ShaderData that stores the Lamp ID to allow fetching it when needed - Store the Lamp ID inside prim or object. Problem: Cycles currently checks these for whether an object was hit - these checks would need to be changed. - Enable OM whenever a Texture Coordinate's Normal output is used. Downside: Might not actually be needed.
2016-10-23Cycles: OpenCL 3d textures support.Hristo Gueorguiev
Note that volume rendering is not supported yet, this is a step towards that. Reviewed By: brecht Differential Revision: https://developer.blender.org/D2299
2016-09-04Fix a few OpenCL compiler warnings.Brecht Van Lommel
2016-08-14Cycles: Add single channel texture support for OpenCL.Thomas Dinges
This way OpenCL devices can also benefit from a smaller memory footprint, when using e.g. bumpmaps (greyscale, 1 channel). Additional target for my GSoC 2016.
2016-08-11Cycles: Enable half float support (4 channels and 1 channel) on CUDA.Thomas Dinges
Atm OpenEXR half files benefit from this and will use only 1/2 of the memory now. More space for HDRs! Part of my GSoC 2016.
2016-08-11Cycles: Change code order for Image Data Types.Thomas Dinges
Now we have the 4 component ones first (float4, byte4, half4) followed by the 1 component ones (float, byte, half). Makes code a bit more consistent and also reduces code a bit when enabling half support on GPU in next commit. This also exposed a typo in half CPU images for 3D textures, which wasn't used yet, but good to have that one fixed anyway.
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-07-11Cycles: Fix Extend image extension mode on OpenCLSergey Sharybin
2016-07-02Fix Cycles OpenCL not taking Extend and Clip extension types into account.Thomas Dinges
(See T48720).
2016-06-21Fix T48691: Cycles - OpenCL - HDR Image mapping does not match CUDA renderingLukas Stockner
The OpenCL texture code didn't offset the coordinates by half a pixel like the CPU code does.
2016-05-27Cleanup: Shorten texture variables, tex and image was kinda redundant.Thomas Dinges
Also make prefix consistent, so it starts with either TEX_NUM or TEX_START, followed by texture type and architecture.
2016-05-19Cycles: Add support for bindless textures.Thomas Dinges
This adds support for CUDA Texture objects (also known as Bindless textures) for Kepler GPUs (Geforce 6xx and above). This is used for all 2D/3D textures, data still uses arrays as before. User benefits: * No more limits of image textures on Kepler. We had 5 float4 and 145 byte4 slots there before, now we have 1024 float4 and 1024 byte4. This can be extended further if we need to (just change the define). * Single channel textures slots (byte and float) are now supported on Kepler as well (1024 slots for each type). ToDo / Issues: * 3D textures don't work yet, at least don't show up during render. I have no idea whats wrong yet. * Dynamically allocate bindless_mapping array? I hope Fermi still works fine, but that should be tested on a Fermi card before pushing to master. Part of my GSoC 2016. Reviewers: sergey, #cycles, brecht Subscribers: swerner, jtheninja, brecht, sergey Differential Revision: https://developer.blender.org/D1999
2016-05-10Cycles: Add support for float4 textures on OpenCL.Thomas Dinges
Title says it all, this adds OpenCL float4 texture support. There is a bug in the code still, I get a "Out of ressources error" on nvidia hardware here, not sure whats wrong yet. Will investigate further, but maybe someone else has an idea. :) Reviewers: #cycles, brecht Subscribers: brecht, candreacchio Differential Revision: https://developer.blender.org/D1983
2016-05-09Cleanup: More byte -> byte4 renaming for consistency.Thomas Dinges
2016-05-06Cleanup: Rename texture slots to float4 and byte, to distinguish from future ↵Thomas Dinges
float (single channel) and half_float slots. Should be no functional changes, tested CPU and CUDA.
2016-04-16Cycles: Refactor Image Texture limits.Thomas Dinges
Instead of treating Fermi GPU limits as default, and overriding them for other devices, we now nicely set them for each platform. * Due to setting values for all platforms, we don't have to offset the slot id for OpenCL anymore, as the image manager wont add float images for OpenCL now. * Bugfix: TEX_NUM_FLOAT_IMAGES was always 5, even for CPU, so the code in svm_image.h clamped float textures with alpha on CPU after the 5th slot. Reviewers: #cycles, brecht Reviewed By: #cycles, brecht Subscribers: brecht Differential Revision: https://developer.blender.org/D1925
2016-03-25Cycles: Cleanup, indent nested preprocessor directivesSergey Sharybin
Quite straightforward, main trick is happening in path_source_replace_includes(). Reviewers: brecht, dingto, lukasstockner97, juicyfruit Differential Revision: https://developer.blender.org/D1794
2016-02-15Cycles: Initial support of 3D textures for CUDA renderingSergey Sharybin
Supports both smoke/fire and point density textures now. Reduces number of textures available for sm_20 and sm_21, but you have to compromise somewhere on such a limited hardware. Currently limited to linear interpolation only, and decoupled ray marching is not supported yet. Think those could be considered just a further improvement. Some quick example: https://developer.blender.org/F282934 Code is minimal and we can fully consider it a fix for missing support of 3D textures with CUDA. Reviewers: lukasstockner97, brecht, juicyfruit, dingto Reviewed By: brecht, juicyfruit, dingto Subscribers: mib2berlin Differential Revision: https://developer.blender.org/D1806
2015-05-09Cycles: OpenCL kernel splitGeorge Kyriazis
This commit contains all the work related on the AMD megakernel split work which was mainly done by Varun Sundar, George Kyriazis and Lenny Wang, plus some help from Sergey Sharybin, Martijn Berger, Thomas Dinges and likely someone else which we're forgetting to mention. Currently only AMD cards are enabled for the new split kernel, but it is possible to force split opencl kernel to be used by setting the following environment variable: CYCLES_OPENCL_SPLIT_KERNEL_TEST=1. Not all the features are supported yet, and that being said no motion blur, camera blur, SSS and volumetrics for now. Also transparent shadows are disabled on AMD device because of some compiler bug. This kernel is also only implements regular path tracing and supporting branched one will take a bit. Branched path tracing is exposed to the interface still, which is a bit misleading and will be hidden there soon. More feature will be enabled once they're ported to the split kernel and tested. Neither regular CPU nor CUDA has any difference, they're generating the same exact code, which means no regressions/improvements there. Based on the research paper: https://research.nvidia.com/sites/default/files/publications/laine2013hpg_paper.pdf Here's the documentation: https://docs.google.com/document/d/1LuXW-CV-sVJkQaEGZlMJ86jZ8FmoPfecaMdR-oiWbUY/edit Design discussion of the patch: https://developer.blender.org/T44197 Differential Revision: https://developer.blender.org/D1200
2015-04-27Cycles: Use native saturate function for CUDASergey Sharybin
This more a workaround for CUDA optimizer which can't optimize clamp(x, 0, 1) into a single instruction and uses 4 instructions instead. Original patch by @lockal with own modification: Don't make changes outside of the kernel. They don't make any difference anyway and term saturate() has a bit different meaning outside of kernel. This gives around 2% of speedup in Barcelona file, but in more complex shader setups with lots of math nodes with clamping speedup could be much nicer. Subscribers: dingto Projects: #cycles Differential Revision: https://developer.blender.org/D1224
2015-04-20Cycles: Split BVH nodes storage into inner and leaf nodesSergey Sharybin
This way we can get rid of inefficient memory usage caused by BVH boundbox part being unused by leaf nodes but still being allocated for them. Doing such split allows to save 6 of float4 values for QBVH per leaf node and 3 of float4 values for regular BVH per leaf node. This translates into following memory save using 01.01.01.G rendered without hair: Device memory size Device memory peak Global memory peak Before the patch: 4957 5051 7668 With the patch: 4467 4562 7332 The measurements are done against current master. Still need to run speed tests and it's hard to predict if it's faster or not: on the one hand leaf nodes are now much more coherent in cache, on the other hand they're not so much coherent with regular nodes anymore. Reviewers: brecht, juicyfruit Subscribers: venomgfx, eyecandy Differential Revision: https://developer.blender.org/D1236
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.
2015-02-19Cycles: Make sphere and tube image mapping friendly with OpenCLSergey Sharybin
OpenCL doesn't let you to get address of vector components, which is kinda annoying. On the other hand, maybe now compiler will have more chances to optimize something out.
2015-01-21Cycles: Support tube projection for imagesSergey Sharybin
This way Cycles finally becomes feature-full on image projections compared to Blender Internal and Gooseberry Project Team could finally finish the movie.
2015-01-21Cycles: Support sphere mapping for the image textureSergey Sharybin
2014-12-25Cleanup: Fix Cycles Apache header.Thomas Dinges
This was already mixed a bit, but the dot belongs there.
2014-10-07Fix T42106: Box image mapping shows black triangles if they point to a ↵Sergey Sharybin
corner and blend is 0 After discussion with cambo here we decided it's better to choose arbitrary side of the box (in this case it's X-axis) and use image from it. That's better than doing a blackness. P.S. This is literally a corner case anyway.
2014-06-14Cycles: Add support for uchar4 attributes.Thomas Dinges
* Added support for uchar4 attributes to Cycles' attribute system. * This is used for Vertex Colors now, which saves some memory (4 unsigned characters, instead of 4 floats). * GPU Texture Limit on sm_20 and sm_21 decreased from 95 to 94, because we need a new texture for the uchar4 attributes. This is no problem for sm_30 or newer. Part of my GSoC 2014.
2014-06-13Cycles Refactor: Add SSE Utility code from Embree for cleaner SSE code.Thomas Dinges
This makes the code a bit easier to understand, and might come in handy if we want to reuse more Embree code. Differential Revision: https://developer.blender.org/D482 Code by Brecht, with fixes by Lockal, Sergey and myself.
2014-05-11Quiet warnings with __CUDA_ARCH__ useCampbell Barton
2014-05-11Cycles / CUDA: Increase maximum image textures on GPU.Thomas Dinges
Instead of 95, we can use 145 images now. This only affects Kepler and above (sm30, sm_35 and sm_50). This can be increased further if needed, but let's first test if this does not come with a performance impact. Originally developed during my GSoC 2013.