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-02-08EEVEE: Add back support for user occlusion on eevee_specular BSDFClément Foucault
2021-02-07EEVEE: Replace constant booleans by const floatClément Foucault
This makes principled optimization easier and less verbose. Tests shows no differences in performance.
2021-02-07EEVEE: Rewrite closure_lit_lib to reduce complexityClément Foucault
This rewrite improves: - Code clarity: Less duplicated code and removes a few hacks. - Compile time performance: Shader code was divided by 3 in average. I did not profile the compilation time but it is faster. - Shading Perf: Noticed a 25% performance improvement on the shading pass with default dielectric principled bsdf. - Fix Principled Tint being white if color is black - It seems to have fixed issues on some drivers giving some incorect results. - Changes Principled BSDF support to be less hacky.
2021-01-26Viewport Rendering: Don't clamp when overlays are disabled.Jeroen Bakker
During viewport rendering the color values were clamped in order to apply the overlay on top of it. This clamping would show the scene colors washed out. This patch adds a work around to skip the clamping when the overlays are turned off. Parial fix for {T77909}
2020-12-18Fix T83494: Eevee clamp node incorrect when min > max.Jeroen Bakker
In glsl the clamp function has undefined behavior when min > max. For the clamp node this resulted in differences between cycles and eevee. This patch adds the expected implementation for minmax. The old clamp function is still used in cases where we know for certain that the input values are correct (math node clamp option). GPU uses optimized code and silicon in these cases.
2020-12-04EEVEE: Arbitrary Output VariablesJeroen Bakker
This patch adds support for AOVs in EEVEE. AOV Outputs can be defined in the render pass tab and used in shader materials. Both Object and World based shaders are supported. The AOV can be previewed in the viewport using the renderpass selector in the shading popover. AOV names that conflict with other AOVs are automatically corrected. AOV conflicts with render passes get a warning icon. The reason behind this is that changing render engines/passes can change the conflict, but you might not notice it. Changing this automatically would also make the materials incorrect, so best to leave this to the user. **Implementation** The patch adds a copies the AOV structures of Cycles into Blender. The goal is that the Cycles will use Blenders AOV defintions. In the Blender kernel (`layer.c`) the logic of these structures are implemented. The GLSL shader of any GPUMaterial can hold multiple outputs (the main output and the AOV outputs) based on the renderPassUBO the right output is selected. This selection uses an hash that encodes the AOV structure. The full AOV needed to be encoded when actually drawing the material pass as the AOV type changes the behavior of the AOV. This isn't known yet when the GLSL is compiled. **Future Developments** * The AOV definitions in the render layer panel isn't shared with Cycles. Cycles should be migrated to use the same viewlayer aovs. During a previous attempt this failed as the AOV validation in cycles and in Blender have implementation differences what made it crash when an aov name was invalid. This could be fixed by extending the external render engine API. * Add support to Cycles to render AOVs in the 3d viewport. * Use a drop down list for selecting AOVs in the AOV Output node. * Give user feedback when multiple AOV output nodes with the same AOV name exists in the same shader. * Fix viewing single channel images in the image editor [T83314] * Reduce viewport render time by only render needed draw passes. [T83316] Reviewed By: Brecht van Lommel, Clément Foucault Differential Revision: https://developer.blender.org/D7010
2020-11-26GPencil: Cleanup - Remove unused old shadersAntonio Vazquez
These fill shaders were used with the old draw engine.
2020-11-17Merge branch 'blender-v2.91-release'Richard Antalik
Conflicts: source/blender/editors/render/render_opengl.c source/blender/sequencer/intern/effects.c
2020-11-17Fix T81827: MacOS lines that should be thick are green insteadClément Foucault
The issue was the use of alpha values of 0 when there were no blending enabled. This patch just disables the smoothing of the wires in this case.
2020-11-04Merge branch 'blender-v2.91-release'Richard Antalik
2020-11-04Fix T82385 EEVEE: Alpha Clip shadows actually using Alpha Hashed shadowsClément Foucault
The shadow path was not using the alpha threshold.
2020-11-04Cleanup: make formatAaron Carlisle
2020-11-03Materials: support true float4 attributes in the Attribute node.Alexander Gavrilov
Add a new Alpha socket to the Attribute node that outputs the fourth component of the attribute. Currently the only such attribute is vertex color, but there may be more in the future. If the attribute has no alpha channel, the expected value is 1. The Cycles code is already refactored and committed by Brecht. Ref D2057
2020-10-22EEVEE: Principle BSDF: Use multi-scatter switch for the glass variantClément Foucault
This avoid strange discrepency between the general purpose variant and the specialized glass variant which did not have a way to turn multi-scatter off.
2020-10-20EEVEE: ShaderToRGB alpha inversedJeroen Bakker
The alpha out socket output the average transmittance, not the alpha. This patch will convert the transmittance to alpha. Found during research of T80919; Issue introduced when `Closure.opacity` was migrated to `Closure.transmittance`. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D9010
2020-10-14Cleanup: multi-line comment blocksCampbell Barton
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-10-08Fix T80974 GPU: Wide Line emulation shader does not always worksClément Foucault
This was caused by points well behind the near clip making the computation of the width wrong. The fix is to clip the line to the near clip plane.
2020-09-29Revert "Fix T81002: Images drawn with the Python gpu module no longer draw ↵Jeroen Bakker
on top in the Image Editor" This reverts commit 085329f114beb904ed3ef0c8ec6894ee26916704. It didn't render rendered viewport overlays correctly.
2020-09-22Fix T81002: Images drawn with the Python gpu module no longer draw on top in ↵Jeroen Bakker
the Image Editor Since {D8234} the image editor is drawn using a depth buffer. When using `draw_texture_2d` the image is drawn using the 2D_IMAGE shader. inside the vertex buffer the image was pushed to the background. This was introduced by {648924333234} what seems to be out dated as we have done several overhauls in this area. (workbench refactor, overlay engine refactor, color management pipeline). This patch removes the pushing of the image to the background.
2020-09-19Cleanup: consistent TODO/FIXME formatting for namesCampbell Barton
Following the most widely used convention for including todo's in the code, that is: `TODO(name):`, `FIXME(name)` ... etc.
2020-09-19EEVEE: Fix Missing GGX multi-scattering on Glass BSDFClément Foucault
Oversight that should have been in rB6f3c279d9e70
2020-09-19EEVEE: Add support for GGX Multi-scatterClément Foucault
Based on http://jcgt.org/published/0008/01/03/ This is a simple trick that does *not* have a huge performance impact but does work pretty well. It just modifies the Fresnel term to account for the multibounce energy loss (coloration). However this makes the shader variations count double. To avoid this we use a uniform and pass the multiscatter use flag inside the sign of f90. This is a bit hacky but avoids many code duplication. This uses the simplification proposed by McAuley in A Journey Through Implementing Multiscattering BRDFs and Area Lights This does not handle area light differently than the IBL case but that's already an issue in current implementation. This is related to T68460. Reviewed By: brecht Differential Revision: https://developer.blender.org/D8912
2020-09-19Fix T79557 EEVEE: Normalize in vector math node is not null vector safeClément Foucault
This add basic null safe handling for this operation.
2020-09-18GPUShader: Fix wide line emulation with flat color interpolation.Clément Foucault
This was causing flashing colors in the node editor grid. This is because in some cases the flat color is only set on the provoking vertex which is the last of the primitive by default.
2020-09-18EEVEE: Fixed Compilation ErrorJeroen Bakker
Regression from {b248ec97769f}. A new parameter was introduced, but the stub shader macros still had the old number of parametes. This change adds a new dummy parameter to the stub macros.
2020-09-17Shaders: add emission strength input to Principled BSDF nodeAlex Strand
This impacts I/O add-ons. OBJ, FBX and Collada have been updated, glTF not yet. Differential Revision: https://developer.blender.org/D4971
2020-09-09UI: Fix Icon drawing on MacOSClément Foucault
It seems that using a vertex shader using both `gl_InstanceID` and `gl_VertexID` is causing some issues on MacOS + Intel Iris. Regression introduced by rB052538edc1fba109d3427471047611888ed13bea
2020-09-05Cleanup: clang-formatCampbell Barton
2020-09-03Fix T79803: Wrong Distance To Edge 1D VoronoiOmarSquircleArt
The current 1D Voronoi implementation for the Distance to Edge option computes the distance to the cells instead. This patch fixes that and compute the distance to the edge. Reviewed By: JacquesLucke, brecht Differential Revision: https://developer.blender.org/D8634
2020-09-01UI: Widget: Add conservative raster to avoid cut widget bordersClément Foucault
This avoids incorrect AA when the widget is not perfectly alligned with the pixel grid.
2020-09-01Cleanup: Use GPUBatch for icon and area drawingClément Foucault
This is in order to remove GPU_draw_primitive to streamline the drawing abstraction.
2020-08-18Fix T79568 EEVEE: Film transparent not workingClément Foucault
Since world shader use the same standard output and are considered opaque, we need to set alpha as holdout.
2020-07-30EEVEE: GLSL refactor/cleanupClément Foucault
- add the use of DRWShaderLibrary to EEVEE's glsl codebase to reduce code complexity and duplication. - split bsdf_common_lib.glsl into multiple sub library which are now shared with other engines. - the surface shader code is now more organised and have its own files. - change default world to use a material nodetree and make lookdev shader more clear. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D8306
2020-07-20Fix T78977 GPU: blf fonts are not gamma correctedClément Foucault
2020-07-18Cleanup: GPUShader: Remove unused builtin shaderClément Foucault
2020-07-15EEVEE: Fix undefined behavior in world outputClément Foucault
2020-07-13EEVEE: Fix sky zenith bugSzymon Ulatowski
Careless use of acos() in spherical coordinates transformation was deteriorating the precision near zenith (and nadir) and producing glitchy pixels (best seen in longer focal lengths). Reviewed By: fclem Differential Revision: https://developer.blender.org/D8266
2020-07-09EEVEE: Implement the missing Sky textureSzymon Ulatowski
I'm not sure if the Sky was deliberately left out or was just waiting for a better moment, but so many I was disappointed that Sky in EEVEE is completely white. There are already 2 implementations (osl and gpu) so this is the third one. Looking at other cases it seems that we are not supposed to share sources between cycles and the rest? So the new util_sky_model files are just copies of what is already in cycles, except that the data file uses the RGB variant of the Hosek/Wilkie model, because we output RGB anyway (but can be easily changed to XYZ if desired - the results are nearly identical). I am not sure if it is okay to pass 3*9 float values as 3 mat4 uniforms (I wanted to use mat3 but it does not work). Also, should I cache the sky model data between renders if the parameters do not change? Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D7108
2020-07-07Fix T78307 UI: Drawing artifacts in the Blender UI on macOSClément Foucault
This was due to a bad driver which was not respecting this bit of the specification: `If the current primitive does not originate from an instanced draw command, the value of gl_InstanceID is zero.`
2020-07-04UI: Attempt to fix OSX widget shader issueClément Foucault
Some OSX GL driver implementation needs a dummy vbo read. This fixed issues with the Hair shaders in the past. Related to T78307
2020-07-02Fix T77686: EEVEE environment pass with film transparencyJeroen Bakker
When the film is set to transparent the environment pass should still be rendered solid. otherwise it renders black. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D8046
2020-06-30EEVEE: Fix undefined behavior when using BSDF nodes inside volume shadersClément Foucault
This should fix T76171 Eevee bsdf shaders glitches
2020-06-26Fix T78237 UI: NLA colors black and brokenClément Foucault
This was caused by missing GL blend. This patch also fix the broken strip appearance under timeline zoom.
2020-06-22UI: Widget: Replace geometry by fragment shader drawingClément Foucault
This means all the antiailasing is done inside the fragment shader. We use a Signed Distance Field to draw the 2D rounded boxes. This ensure the best quality for AA. This reduce the averge Batch for widget to 16 verts instead of ~600 and reduce overshading a lot. Theme Emboss alpha and tria alpha needs to be changed after this refactor. The shadow drawing is left unchanged and still use geometry. Reviewed By: Severin Differential Revision: https://developer.blender.org/D7833
2020-06-22UV Editor: Fix Vertex Overlay color not being color managedClément Foucault
Could be backported to 2.83 LTS
2020-06-22Fix T62917 UV editor: Edge overlay not shown when edge overlay type is DashClément Foucault
Fix by changing the shader to always compute dash for uv and just change dash size to something really big for other overlay types.
2020-06-03Cleanup: GPUMaterilal: Texture Node: Remove unused functionsClément Foucault
2020-06-03GPUMaterial: Rework/simplify image texture filteringClément Foucault
This use the latest GPUTexture change to use the sampler state to avoid the pole issues instead of using GLSL hacks. This should fix T73942: Eevee mipmaps not respecting border mode. Note that this also fix some discrepencies between cycles and eevee (like boxmapping + clip).
2020-06-03GPUMaterial: Rework/simplify environment texture filteringClément Foucault
This use the latest GPUTexture change to use the sampler state to avoid the pole issues instead of using GLSL hacks.