Age | Commit message (Collapse) | Author |
|
|
|
This makes principled optimization easier and less verbose. Tests shows
no differences in performance.
|
|
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.
|
|
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}
|
|
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.
|
|
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
|
|
These fill shaders were used with the old draw engine.
|
|
Conflicts:
source/blender/editors/render/render_opengl.c
source/blender/sequencer/intern/effects.c
|
|
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.
|
|
|
|
The shadow path was not using the alpha threshold.
|
|
|
|
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
|
|
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.
|
|
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
|
|
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
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.
|
|
on top in the Image Editor"
This reverts commit 085329f114beb904ed3ef0c8ec6894ee26916704.
It didn't render rendered viewport overlays correctly.
|
|
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.
|
|
Following the most widely used convention for including todo's in
the code, that is: `TODO(name):`, `FIXME(name)` ... etc.
|
|
Oversight that should have been in rB6f3c279d9e70
|
|
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
|
|
This add basic null safe handling for this operation.
|
|
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.
|
|
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.
|
|
This impacts I/O add-ons. OBJ, FBX and Collada have been updated, glTF not yet.
Differential Revision: https://developer.blender.org/D4971
|
|
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
|
|
|
|
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
|
|
This avoids incorrect AA when the widget is not perfectly alligned with the
pixel grid.
|
|
This is in order to remove GPU_draw_primitive to streamline the drawing
abstraction.
|
|
Since world shader use the same standard output and are considered opaque,
we need to set alpha as holdout.
|
|
- 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
|
|
|
|
|
|
|
|
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
|
|
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
|
|
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.`
|
|
Some OSX GL driver implementation needs a dummy vbo read. This fixed issues
with the Hair shaders in the past.
Related to T78307
|
|
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
|
|
This should fix T76171 Eevee bsdf shaders glitches
|
|
This was caused by missing GL blend. This patch also fix the broken
strip appearance under timeline zoom.
|
|
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
|
|
Could be backported to 2.83 LTS
|
|
Fix by changing the shader to always compute dash for uv and just change
dash size to something really big for other overlay types.
|
|
|
|
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).
|
|
This use the latest GPUTexture change to use the sampler state to avoid
the pole issues instead of using GLSL hacks.
|