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
2019-08-30GPU: Split gpu_shader_material into multiple files.OmarSquircleArt
This patch continue the efforts to split the `gpu_shader_material` file started in D5569. Dependency resolution is now recursive. Each shading node gets its own file. Additionally, some utility files are added to be shared between files, like `math_util`, `color_util`, and `hash`. Some files are always included because they may be used in the execution function, like `world_normals`. Some glsl functions appeared to be unused, so they were removed, like `output_node`, `bits_to_01`, and `exp_blender`. Other functions have been renamed to be more general and get used as utils, like `texco_norm` which became `vector_normalize`. A lot of the opengl tests fails, but those same tests also fail in master, so this is probably unrelated to this patch. Reviewers: brecht Differential Revision: https://developer.blender.org/D5616
2019-08-27Cleanup: fix compiler warningBrecht Van Lommel
2019-08-27Workbench: Specular Highlighting for MatCapsJeroen Bakker
With Blender 2.80 we introduced a more flexible matcap system. One change we did was to multiply the matcap with the base color that was shaded. As matcaps contains diffuse and specular lighting in a single texture this lead to rendering artifacts. Artists were complaining that everything looked to metalic. We now support a separate `diffuse` and `specular` pass for matcaps. `shaded_color = diffuse_light * base_color + specular_light` For matcaps to support this feature they need to be multilayer openexr files with 2 renderpasses (named `diffuse` and `specular`). In the future we can change this to first pass/second pass in stead of this naming convention. Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D5335
2019-08-26GPU: add mechanism for splitting up big gpu_shader_material.glsl fileBrecht Van Lommel
Compiling this big file for every Eevee material is bad for performance, and now that we are adding more nodes it gets worse. This patch adds a simple mechanism to split up that file, and use only the parts used by shader nodes. When a function is used by GPU_link, we detect which GLSL file it came from and use it in GLSL code generation automatically. Dependencies between GLSL files are manually specified, and function names must be unique across all GLSL files. Most of the actual splitting up will be done in later commits. Differential Revision: https://developer.blender.org/D5569
2019-08-25Cleanup: redundant struct declarationsCampbell Barton
2019-08-22Shading: Add object color to Object Info node.OmarSquircleArt
The object color property is added as an additional output in the Object Info node. Reviewers: brecht Differential Revision: https://developer.blender.org/D5554
2019-08-21GPU: Fix Element index range calculationClément Foucault
Fix T68880 2D line display is broken
2019-08-17Cleanup: spellingCampbell Barton
2019-08-16Fix T68009: Recognize X.Org/AMD as GPU_DEVICE_ATI and open source driverRémi Verschelde
Reviewed By: #gpu_viewport, fclem Differential Revision: https://developer.blender.org/D5392
2019-08-16Cleanup: spellingCampbell Barton
2019-08-15GPU: Vertex Format: Increase number of byte per attribute nameClément Foucault
This reduces the risks of hash collision while maintaining a small number of character per attrib.
2019-08-15GPU: Vertex Format: ADd function for safe GLSL attrib nameClément Foucault
This remove code duplication and use base63 encoding of the hash. Use mumur hash to have more randomness.
2019-08-14Mesh Batch Cache: Refactor + MultithreadClément Foucault
For clarity sake, the batch cache now uses exclusively per Loop attributes. While this is a bit of a waste of VRAM (for the few case where per vert attribs are enough) it reduces the complexity and amount of overall VBO to update in general situations. This patch also makes the VertexBuffers filling multithreaded. This make the update of dense meshes a bit faster. The main bottleneck is the IndexBuffers update which cannot be multithreaded efficiently (have to increment a counter and/or do a final sorting pass). We introduce the concept of "extract" functions/step. All extract functions are executed in one thread each and if possible, using multiple thread for looping over all elements. Reviewed By: brecht Differential Revision: http://developer.blender.org/D5424
2019-08-14Cleanup: move trailing comments to avoid wrapping codeCampbell Barton
Some statements were split across multiple lines because of their trailing comments. In most cases it's clearer to put the comments above.
2019-08-14Manage GPU_matrix stacks per GPUContextJulian Eisel
Previously, we had one global `GPU_matrix` stack, so the API was not thread safe. This patch makes the stack be per `GPUContext`, effectively making it local per thread (`GPUContext` is located in thread local storage). Reviewed By: brecht Differential Revision: https://developer.blender.org/D5405
2019-08-14Eevee: Fix background alpha regressionClément Foucault
2019-08-14Eevee: Improve Transparent BSDF behaviorClément Foucault
Alpha blended Transparency is now using dual source blending making it fully compatible with cycles Transparent BSDF. Multiply and additive blend mode can be achieved using some nodes and are going to be removed.
2019-08-07Remove compiler fix for unsupported MSVC versionJulian Eisel
2019-08-06Fix T67437: Vertex Colors Not Visible In SculptModeJeroen Bakker
Recently Shader parameter names for UVMaps and vertex colors were renamed. The sculpt drawing code still used the old parameter names. Reviewed By: fclem Differential Revision: https://developer.blender.org/D5320
2019-08-01GPU: more complete coverage of drivers for Intel shader compilation workaroundBrecht Van Lommel
2019-08-01Cleanup: misc spelling fixes in variable names & definesCampbell Barton
T68045 by @luzpaz
2019-07-31Fix T67951: Bone selection is broken on some Intel GPUsmano-wii
The problem is that the `glDrawArraysInstancedBaseInstance` is ignoring the last parameter. The solution is to indicate that `GLEW_ARB_base_instance` is not supported in these cases. Reviewers: fclem, brecht, jbakker Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D5383
2019-07-303D View: Move selection API to a Selection engine.mano-wii
This commit moves the API of selecting faces, vertices and edges to a DRW manager engine. Reviewers: campbellbarton, fclem Subscribers: jbakker, brecht Differential Revision: https://developer.blender.org/D5090
2019-07-15Fix T67009, T67013: crash with Intel HD Graphics and some older driversBrecht Van Lommel
Add more versions to the workaround list.
2019-07-15Fix T63349: image texture garbage collection causing freezesBrecht Van Lommel
Images were being freed often because the tagging for when the image was last used was missing. Differential Revision: https://developer.blender.org/D5252
2019-07-15Fix crash running GPU shader.format_calc() with attributes like gl_VertexIDJeroen Bakker
When using opengl attributes such as gl_VertexID in a shader its location is set to -1. This location was used without checking in an attribute array. This fails big time when called from python. For example `print(shader.format_calc())` made python crash immediately. this fixes https://github.com/JacquesLucke/animation_nodes/issues/1141 Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D5231
2019-07-15Fix crash HD Graphics 4000 Series On WindowsJeroen Bakker
There was an workaround implemented for specific the Intel HD Graphics 4000 GPU on Windows platform. Other GPU from the same series also need this workaround. We will enable the workaround for specific drivers. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5239
2019-07-09Cleanup: GPU: Correct commentClément Foucault
2019-07-09Fix T61474: laggy interaction on Windows/NVIDIA when gizmos are visibleBrecht Van Lommel
Thanks to Sergey and Clément for helping to track this down.
2019-07-09GPU: ATI Proxy checkJeroen Bakker
The AMD PRO driver on linux PROXY check also fails. Now the configuration ATI/Unix/Official driver will also bypass the Proxy test. Reviewed By: fclem Differential Revision: https://developer.blender.org/D5205
2019-07-09GPU: added debug value to investigate lagging issue in T6147Brecht Van Lommel
2019-07-09Fix T66573 Heap Corruption when baking to irradiance volume probeClément Foucault
This is an AMD Proprietary driver bug. Will be reported upstream.
2019-07-08Fix T66351 Wireframe display in sculpt-mode broke when hiding partsClément Foucault
2019-07-07Cleanup: spellingCampbell Barton
2019-07-03Fix T66372 Convert to mesh with subdivision breaks topologyClément Foucault
This was caused by a check that was not taking the restart index into account.
2019-07-02Cleanup: move comments onto own lines to avoid breaking linesCampbell Barton
2019-07-02Cleanup: rename set_inverted_drawing, move to GPU_stateCampbell Barton
2019-06-26Revert "GPU: Create and use new GPU_texture_read_rect utility."mano-wii
This reverts commit e061cb44378efaf159a30fb1c5834db48ffb2bb3. This function is problematic on some operating systems. # Conflicts: # source/blender/draw/intern/draw_manager.c # source/blender/gpu/GPU_texture.h # source/blender/gpu/intern/gpu_texture.c
2019-06-24Fix T65812: Image empty has wrong aspect with limit texture sizeCampbell Barton
2019-06-22Cleanup: add bracesCampbell Barton
2019-06-22GPU_matrix: Add GPU_matrix_unproject_precalcCampbell Barton
Pre-calculates values needed for unprojecting to avoid a matrix invert and extracting projection matrix dimensions for every call to GPU_matrix_unproject. Use for gizmo selection drawing.
2019-06-21Fix T62876: Camera Background ImagesJeroen Bakker
Migrate old legacy code to the draw mamager/object mode. The old legacy version did not work with wireframe. By migrating the code to modern draw manager code we have mode control on the drawing process. Still background images do not work with OIT, the cause seems to be that the transparent pixels are treated as background pixels. Also There are some artifacts when working with Holdouts and DoF, this is because the draw engines do not pass the correct alpha values. Reviewers: fclem, brecht Differential Revision: https://developer.blender.org/D4638
2019-06-18Cleanup: GPU: Fix codestyleClément Foucault
2019-06-17Fix T57650 UVEdit: selection not visible if behind unselected UVsClément Foucault
Use depth buffer to order the uv edges correctly to always draw selected edges on top. We still use the double drawing workaround for points to keep the smooth antialiased display.
2019-06-13Fix T61768 Eevee Offscreen renderingClément Foucault
The issue was caused by a bad usage of GPUOffscreen. The Framebuffer was created using a window framebuffer and used in a viewport callback when another GPUContext was bound. This change allows up to 3 framebuffers per GPUOffscreen. Most common case will be using 2 framebuffers (one for init and one for drawing) but in the case of more (bad usage) it will just degrade performance a bit.
2019-06-12Cleanup: spelling in commentsCampbell Barton
2019-06-09Fix T65657: crash in float texture painting, after recent changesBrecht Van Lommel
2019-06-07Fix T64625: Eevee image textures with alpha have dark edgesBrecht Van Lommel
Now texture storage of images is defined by the alpha mode of the image. The downside of this is that there can be artifacts near alpha edges where pixels with zero alpha bleed in. It also adds more code complexity since image textures are no longer all stored the same way. This changes allows us to keep using sRGB texture formats, which have edge darkening when stored with premultiplied alpha. Game engines seems to generally do the same thing, and we want to be compatible with them.
2019-06-06Fix T65383 UI graphics glitches on macOS with Intel HD 4000Clément Foucault
glDrawArrays is not supposed to be affected by primitive restart but osx drivers never cease to surprise me.
2019-06-06Fix T58920: Dyntopo sculpt and snake hook brush artifacts.mano-wii
This is a mix of solutions rBe60b18d51d58 and rB52af5fa31fbc. What happened was that when a node of the BVH gets 0 vertices, the batch is untouched and therefore still drawn.