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
path: root/intern
AgeCommit message (Collapse)Author
2022-06-03Fix use of OpenGL interop breaking in Hydra viewports that do not support itPatrick Mours
Rendering directly to a resource using OpenGL interop and Hgi doesn't work in Houdini, since it never uses the resulting resource (it does not call `HdRenderBuffer::GetResource`). But since doing that simultaneously disables mapping (`HdRenderBuffer::Map` is not implemented then), nothing was displayed. To fix this, keep track of whether a Hydra viewport does support displaying a Hgi resource directly, by checking whether `HdRenderBuffer::GetResource` is ever called and only enable use of OpenGL interop if that is the case. Differential Revision: https://developer.blender.org/D15090
2022-06-03Fix T98570: Cycles AOVs not working in background shaderBrecht Van Lommel
Must include the AOV writing feature in background shader evaluation. Differential Revision: https://developer.blender.org/D15114
2022-05-31Fix Cycles MNEE not working for MetalBrecht Van Lommel
Move MNEE to own kernel, separate from shader ray-tracing. This does introduce the limitation that a shader can't use both MNEE and AO/bevel, but that seems like the better trade-off for now. We can experiment with bigger kernel organization changes later. Differential Revision: https://developer.blender.org/D15070
2022-05-31Fix T97086: corrupted UVs with GPU subdivisionKévin Dietrich
When multiple objects are in edit mode, UVs for the objects, except for the first one (in rendering order) appear corrupted. The corruption is because the UVs are not evaluated as the compute shader is not bound, thus we read unitialized memory. We keep track of the currently bound shader in the GPU context in order to avoid unnecessary shader switches in case the same shader is used in consecutive calls. However, the shader used by the OpenSubdiv evaluator is not part of Blender and therefore not tracked via the GPU context. When extracting UVs for multiple objects, we only ever run a single shader (FVar evaluation). However, between the compute calls, we also call the OpenSubdiv stencil evaluation shader, which uses `glUseProgram` modifying the current program, outside of our control, which then also unbinds the Blender compute shader making the compute dispatch fail ("No active compute shader"). The fact that extracting the UVs for the first rendered object works is because another (Blender) shader was bound in the GPU context prior to our binding of our evaluation shader. To fix this, we remember, in the OpenSubdiv evaluator, the current program so that it can be reset after the stencil program is done. Differential Revision: https://developer.blender.org/D15064
2022-05-30Fix building: stub for OpenSubdivDalai Felinto
Building problem introduced on 24e74f8bef813820. It affects `make lite` and other builds that skip OpenSubdiv.
2022-05-30Fix T98449: Cycles crash changing frame after recent changesBrecht Van Lommel
Subdivision did not properly update when evaluating first without and then with orco coordinates. Now update the subdivision evaluator settings every time, and reallocate the vertex data buffer when needed. there is an additional issue in this file where orco coordinates are not available immediately on the first frame when they should be, and only appear on the second frame. However that is an old limitation related to the depsgraph not getting re-evaluated on viewport display mode changes, here we just fix the crash.
2022-05-27Fix T98270: Cycles shows black with color values > 65K in GPU renderBrecht Van Lommel
After recent changes to Nishita sky to clamp negative colors, the pixels ended up a bit brighter which lead to them exceeding the half float max value. The CUDA float to half function seems to need clamping.
2022-05-27Fix Cycles not rendering byte precision vertex domain colorsBrecht Van Lommel
Code was not yet updated to use generic attributes for vertex colors. This also makes generic attributes work for adaptive subdivision.
2022-05-23Fix T98036: Cycles blackbody inaccurate for low temperature and wide gamutBrecht Van Lommel
Regenerate blackbody RGB curve fit to not clamp values, and extend down to 800K since it does now change below 965K. Note that as before, blackbody is only defined in the range 800K to 12000K and has a fixed value outside of that. But within that range there should be no more unnecessary gamut clamping.
2022-05-23Fix missing 64bit casts when calculating Cycles render buffer offsetSergey Sharybin
Found those missing casts while looking into a crash report made in the Blender Chat. Was unable to reproduce the crash, but the casts should totally be there to avoid integer overflow.
2022-05-23Cleanup: clarify what is scene linear color space in conversion conversionBrecht Van Lommel
* Rename ambiguous rgb to scene_linear in some places * Precompute matrices to directly go to scene instead of through XYZ * Make function signatures more consistent
2022-05-23Python API: add mathutils.Color functions to convert color spacesBrecht Van Lommel
Between scene linear and sRGB, XYZ, linear Rec.709 and ACES2065-1. And add some clarifications about color spaces in the docs. Fixes T98267 Ref T68926 Differential Revision: https://developer.blender.org/D14989
2022-05-18Cleanup: fix Cycles asan warningBrecht Van Lommel
Not sure why constructing a ustring inside [] is causing issues here, but it's slightly more efficient to construct it once anyway.
2022-05-18Subdiv: support interpolating orco coordinates in subdivision surfacesBrecht Van Lommel
This makes changes to the opensubdiv module to support additional vertex data besides the vertex position, that is smootly interpolated the same way. This is different than varying data which is interpolated linearly. Fixes T96596: wrong generated texture coordinates with GPU subdivision. In that bug lazy subdivision would not interpolate orcos. Later on, this implementation can also be used to remove the modifier stack mechanism where modifiers are evaluated a second time for orcos, which is messy and inefficient. But that's a more risky change, this is just the part to fix the bug in 3.2. Differential Revision: https://developer.blender.org/D14973
2022-05-18Cleanup: formatCampbell Barton
2022-05-17Fix T97921: Cycles MNEE issue with light path nodesOlivier Maury
Ensure the correct total/diffuse/transmission depth is set when evaluating shaders for MNEE, consistent with regular light shader evaluation. Differential Revision: https://developer.blender.org/D14902
2022-05-17Fix T98163: Cycles OSL rendering normal maps differentlyBrecht Van Lommel
Match SVM and ensure valid reflection when setting up BSDFs.
2022-05-17Cleanup: fix compiler warningBrecht Van Lommel
2022-05-16Fix T97867: Cycles MNEE blocky artefacts for rough refractive interfacesOlivier Maury
Made tangent frame consistent across the surface regardless of the sample, which was not the case with the previous algorithm. Previously, a tangent frame would stay consistent for the same sample throughout the walk, but not from sample to sample for the same triangle. This actually resulted in code simplification. Also includes additional fixes: * Fixed an important bug that manifested itself with multiple lights in the scene, where caustics had abnormally low amplitude: The final light pdf did not include the light distribution pdf. * Removed unnecessary orthonormal basis generation function, using cycles' native one instead. * Increased solver max iteration back to 64: It turns out we sometimes need these extra iterations in cases where projection back to the surface takes many steps. The effective solver iteration count, the most expensive part, is actually much less than the raw iteration count. Differential Revision: https://developer.blender.org/D14931
2022-05-11Cleanup: Cycles, avoid 'parameter unused' warningSybren A. Stüvel
Avoid 'parameter unused' warning when building Cycles without OpenImageDenoise. No functional changes. Over-the-shoulder reviewed by @sergey
2022-05-10Fix T97908: Cycles missing motion from on pointcloud generated by geometry nodesBrecht Van Lommel
Assume geometry is always potentially animated, since we can't use our heuristic to detect if the object is potentially animated by looking at modifiers on the object. The main original reason for this check was to avoid evaluating subdivision surfaces for many static objects, which is not happening here anyway.
2022-05-10Fix T97966: Cycles shadow terminator offset wrong for scaled object instancesMikhail Matrosov
Differential Revision: https://developer.blender.org/D14893
2022-05-10Fix T97056: Cycles MNEE not working with glass and pure refraction BSDFsOlivier Maury
Differential Revision: https://developer.blender.org/D14901
2022-05-10Fix part of T97895: Cycles not rendering edge domain attributesBrecht Van Lommel
These aren't really ideal for rendering, but better to show something. Edge values are averaged at vertices.
2022-05-05Fix T95308, T93913: Cycles mist pass wrong with SSS shaderBrecht Van Lommel
It was wrongly writing passes twice, for both the surface entry and exit points. We can skip code for filtering closures, emission and holdout also, as these do nothing with only a subsurface diffuse closure present.
2022-05-05Cleanup: clang formatBrecht Van Lommel
2022-05-05Fix T93246: Cycles wrong volume shading after transparent surfaceBrecht Van Lommel
The Russian roulette probability was not taken into account for volumes in all cases. It should not be left out from the SD_HAS_ONLY_VOLUME case.
2022-05-04Fix Cycles world light group confusing UIBrecht Van Lommel
Move to a subpanel of the Settings panel. Otherwise it seems like it's a setting of one of the shader nodes.
2022-05-04Fix T95644: Cycles doesn't update modified object attributes on GPULukas Stockner
evice_update_preprocess is supposed to detect modified attributes and flag the device_vector for a copy through device_update_flags. However, since object attributes are only created in device_update_attributes afterwards, they can't be included in that check. Change the function that actually updates the device_vector to tag it as modified as soon as its content gets updated. Differential Revision: https://developer.blender.org/D14815
2022-05-04Fix T96718: Cycles invalid pixels when using bump normal for light emissionBrecht Van Lommel
A shader node setup accidentally used the bump normal as emission. Bump mapping nodes are excluded from light shader evaluation to reduce kernel size and register pressure, but in that case should write zero instead of leaving memory uninitialized. Thanks to Lukas for helping identify the cause.
2022-05-04Fix Cycles division by zero in material preview renderBrecht Van Lommel
If the render gets cancelled before the first sample finishes.
2022-05-04Cycles: mark all CUDA 11.x versions as supportedBrecht Van Lommel
All released versions appear to work fine. Also slightly change wording.
2022-05-03Fix T96822: Cycles motion blur + persistent data not updating properlyBrecht Van Lommel
At the frame before/after an object starts moving, it's transform may not be modified but its motion would be and requires an update.
2022-05-03CMake: fix error building when CUDA_NVCC_EXECUTABLE is missingCampbell Barton
2022-04-30Fix T96576: Light leaking when using normal maps with Multiscatter GGXLukas Stockner
The Multiscatter GGX code was missing the same-side checks for incoming and outgoing directions w.r.t. to shading and geometry normal. Should not be needed for the Glass variant since it intentionally has both reflection and transmission.
2022-04-29Cycles: Hydra fixes for stageMetersPerUnit and OpenGL context on WindowsPatrick Mours
Add "stageMetersPerUnit" render setting for USD files that have that set to something other than the default (e.g. exported by Blender). And fix a crash when an application creates a Hydra render pass on a thread that does not have an OpenGL context current.
2022-04-29Cycles: add USD as a file format for Cycles standalone renderingBrecht Van Lommel
Long term, this should replace the XML format. This reuses the Hydra render delegate implementation, and so supports the same features. The same command line options and GUI work for both XML and USD also. The implementation of this is still disabled, waiting for some refactoring of USD library linking. However we want the Cycles code to be in sync between repositories for the 3.2 release. Ref T96731
2022-04-29Cycles: refactor Hydra render delegate buildingBrecht Van Lommel
* Leave code for building the render delegate against other applications and their USD libraries to the Cycles repository, since this is not a great fit. In the Blender repository, always use Blender's USD libraries now that they include Hydra support. * Hide non-USD symbols from the hdCycles shared library, to avoid library version conflicts. * Share Apple framework linking between the standalone app and plugin. * Add cycles_hydra module, to be shared between the standalone app and plugin. * Bring external libs code in sync with standalone repo, adding various missing libraries. * Move some cmake include directories to the top level cycles source folder because we need to control their global order, to ensure we link against the correct headers with mixed Blender libraries and external USD libraries.
2022-04-29Cycles: make Hydra display driver optional, for USD without OpenGLBrecht Van Lommel
OpenGL support was removed from Blender's USD precompiled libraries. This is currently only useful when building against other applications anyway.
2022-04-29Cycles: add profiling command line argument to standaloneBrecht Van Lommel
Like --cycles-print-stats for Blender.
2022-04-29Cycles: make internal integrator defaults match Blender more closelyBrecht Van Lommel
This does not affect Blender integration, but gives better defaults for Cycles standalone.
2022-04-29Cleanup: remove unused server app after network render was removedBrecht Van Lommel
2022-04-29Cleanup: fix various Cycles build warnings with non-default optionsBrecht Van Lommel
* Float/double promotion warnings were mainly meant for avoiding slow operatiosn in the kernel. Limit it to that to avoid hard to fix warnings in Hydra. * Const warnings in Hydra iterators. * Unused variable warnings when building without glog. * Wrong camera enum comparisons in assert. * PASS_UNUSED is not a pass type, only for pass offsets.
2022-04-29Cleanup: fix unused parameter warningSybren A. Stüvel
Fix 'unused parameter' warning when building without OpenColorIO. No functional changes.
2022-04-29Fix Cycles versioning code after recent changeSergey Sharybin
Need to use get() instead of is_property_set() for properties which are not defined as Property.
2022-04-29Cleanup: Remove old filter property.Thomas Dinges
It was kept for forward compatibility during 2.7x. Reference rB5a45ccaf3e5102ee571599fa9f26a78ac1f6d0f4
2022-04-28Fix T94467: Cycles baking of normal pass slower than before cycles-xBrecht Van Lommel
2022-04-28Ensure BSDF evals and pdfs are zero on invalid samplesSebastian Herholz
Currently, the `eval` and `pdf` are not explicitly set to zero when a BSDF sample is invalid (e.g., below the upper hemisphere), when calling `bsdf_sample` or `bsdf_eval`. It is assumed that `eval` and `pdf` are set to zero before these functions are called, which can cause problems if not. This patch fixes this potential problem by explicitly setting `eval` and `pdf` to zero when the sampled direction is invalid. I also added a sanity check if `eval` and `pdf` are valid (i.e., >= 0.f). The check is activated when build in debug mode and with the `WITH_CYCLES_DEBUG` set to `ON`. Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D14776
2022-04-28Fix: Sky models can return negative valuesSebastian Herholz
When converting from XYZ to RGB it can happen, in some sky models, that the resulting RGB values are negative. Atm, this is not considered and the returned values for the sky model can be negative. This patch clamps the returned RGB values to be `= 0.f` Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D14777
2022-04-28Fix T97056: Cycles MNEE caustics treated as direct instead of indirect lightChristophe Hery
This fixes wrong render passs and bounce limits. Differential Revision: https://developer.blender.org/D14737