Age | Commit message (Collapse) | Author |
|
T68035 by @luzpaz
|
|
Fix by adding a threshold instead of direct null comparison.
|
|
|
|
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.
|
|
|
|
When using FXAA when rendering to an image the alpha channel was not
correct what lead to visual artifacts.
These artifacts come from the FXAA function that overwrites the alpha
channel with the original Luma of the texel. In the shader this can be
turned on or off. But at the end it always overwrites the alpha with the
luminance.
We didn't use this feature, but the alpha of the resulting pixel still
contained the luma value what lead to render artifacts.
By overwriting the alpha channel with the original alpha we remove these
artifacts.
Reviewed By: fclem
Maniphest Tasks: T64947
Differential Revision: https://developer.blender.org/D4924
|
|
This small fix in the GLSL shader seems do to the trick: now smoke won't jitter when using the adaptive domain.
The previous workaround rB3891ad8e0317 is still needed too, i.e. the bug that caused jitter this time was not related to the previous one.
|
|
Hair normals were not behaving correctly. This corrects their looks and
fix the node shader geometry that was showing the flat normal.
|
|
|
|
Cycles now uses the color space on the image datablock, and uses OpenColorIO
to convert to scene linear as needed. Byte images do not take extra memory,
they are compressed in scene linear + sRGB transfer function which in common
cases is a no-op.
Eevee and workbench were changed to work similar. Float images are stored as
scene linear. Byte images are compressed as scene linear + sRGB and stored in
a GL_SRGB8_ALPHA8 texture. From the GLSL shader side this means they are read
as scene linear, simplifying the code and taking advantage of hardware support.
Further, OpenGL image textures are now all stored with premultiplied alpha.
Eevee texture sampling looks a little different now because interpolation
happens premultiplied and in scene linear space.
Overlays and grease pencil work in sRGB space so those now have an extra
conversion to sRGB after reading from image textures. This is not particularly
elegant but as long as engines use different conventions, one or the other
needs to do conversion.
This change breaks compatibility for cases where multiple image texture nodes
were using the same image with different color space node settings. However it
gives more predictable behavior for baking and texture painting if save, load
and image editing operations have a single color space to handle.
Differential Revision: https://developer.blender.org/D4807
|
|
This removes ModelViewProjectionMatrix usage
|
|
|
|
|
|
This is in order to lower the number of matrices to compute.
|
|
|
|
Currently it is not possible to view the vertex colors of an object. To
optimize the workflow, workbench will need to support Vertex Colors.
The Vertex Colors is a new option in `shading->color_type`. When objects
do not have vertex color, the objects will be rendered with the
`V3D_SHADING_OBJECT_COLOR`.
In order to support vertex colors in workbench the current texture/solid
shading structure is migrated to a primary shaders and fallback shaders.
Fix: T57000
Reviewers: brecht, fclem
Differential Revision: https://developer.blender.org/D4694
|
|
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
|
|
|
|
This was due to the forward part of the engine not supporting rendered
alpha channel.
|
|
|
|
This was because color is not present in the density texture if there is
only one constant color. Adding it as a uniform.
|
|
The degenerate triangle threshold was too big. Making it an equal test can
introduce problems in other cases but I could not make it fail.
|
|
|
|
This just maintain more parity accross the 2 visuals. Note that this is not
"real shadowing" just the facing factor shadowing.
|
|
This adds the posibility of having certain materials transparent in solid
mode. The option is (for now) per material only and thus only shows in
material color mode.
This uses the same rendering technique as Xray mode.
Note that objects are not considered transparent for selection with this.
|
|
- Add noise to remove undersampling artifact
- Create 2 mipmaps to the scene color buffer in order to have bigger blurs
- Replace blur2 with a 3x3 median filter that doesn't dilate the highlights
- Use temporal accumulation to remove noise
For some reason all of this exacerbate some bleeding issues happening on
far foreground elements from near foreground elements. The actual problem
was already happening before but was not really noticeable. It needs some
more work to be fixed.
|
|
|
|
- Compute samples positions on CPU.
- Use 3x3 Box blur instead of 2x2.
- Implement bokeh parameters.
With this commit, dof performance is almost negligeable.
The quality is a bit lower than before but can be improve. Also now big
Circle of confusion are supported (up to 200px).
Cost is ~1.25ms on AMD Vega with a 2560p viewport than full HD and
pretty shallow depth of field.
Coc downsampling and dilation is not used anymore for now (commented).
|
|
The algorithm used is borrowed from :
http://tuxedolabs.blogspot.com/2018/05/bokeh-depth-of-field-in-single-pass.html
This makes it possible to have a decent blur for foreground over defocused
background in one pass only.
The algorithm is using a gather approach that is much faster
than the scatter approach used in Eevee. This makes it possible to have
custom bokeh shapes (not implemented yet) which would be impossible with
a separable gaussian technique.
The blur is done in 2 steps. The first one define the shape of the bokeh
and the second that fill the undersampling.
A downsample max-CoC tile texture speed up the gathering process.
|
|
|
|
Caused:
error: unsized array index must be constant
Use hard coded number of clipping planes, copying the 4th to 5 & 6
when only 4 are used.
|
|
Use clipping for workbench solid mode drawing.
Other modes & shading support still needs to be added.
|
|
This makes it possible to paint pixel art using the workbench.
Cubic interpolation is not supported but could be added if needed.
|
|
|
|
|
|
|
|
|
|
Fixes T58735 Incorrect workbench shadow from n-gons
This also optimize the degenerate triangle detection by searching if
their area is near 0.0.
|
|
|
|
|
|
Also optimize deferred engine by only outputing material data if needed.
This make the bare flat shading mode (no effects) only a depth prepass.
|
|
|
|
This reduces the bandwidth + vram usage of workbench even further.
|
|
We separate the background and foreground shading passes to be able to make
the object id pass optionnal if we don't need it.
This saves a bit more memory. Also not clearing all rendertargets saves
some GPU time too.
|
|
It is not used anymore
|
|
We exploit the fact that we are using the metallic workflow for material
and pass the metallic parameter instead of the specular color.
Pack the front facing bit in the color buffer only for matcap display.
Change buffer formats to use less bytes as possible.
Also don't request buffers that we won't use.
Saved 40MB on 2K screen on StudioLight + Shadows + Specular Lighting.
Includes several cleanups.
|
|
Shadow focus let the user choose how hard are is the shadows transition.
Harder shadow transition can be used for stylistic effects or more uniform
shading.
Make shadow orientation respect the same orientation as the studio light
(view from +Y direction aka. front view). Make the default shadow direction
more similar to the default light position (the default light object, not
the default studio lighting).
|
|
* Move the curvature computation to the cavity pass: One can argue it's not
the best performance wise (it gets a tiny perf pernalty if it is done
alone without the ssao), but it make the code cleaner and reduce
considerably the number of shader variation possible.
* Lower shader variation to 2^8 instead of 2^12
|
|
|
|
This is in order to have more flexible ligthing presets in the future.
The diffuse lighting from hdris was nice but lacked the corresponding
specular information. This is an attempt to make it possible to customize
the lighting and have a cheap/easy/nice-looking pseudo-PBR workflow.
* Add cheap PBR to Workbench with fresnel and better roughness support.
This improves the look of the metallic surfaces and is easier to control.
* Add ambient light to studio lights settings: just a constant color added
to the shading.
* Add Smooth option to studio lights settings: This option fakes the
effect of making the light bigger making the lighting smoother for this
light. Smoother lights gets reflected like a background hdri.
* Change default light settings to include the smooth params.
* Remove specular highlights from flat shading. (could be added back but
how do we make it good looking?)
* If specular lighting is disabled, use base color without using metallic.
* Include a lot of code simplification/cleanup/confusion fix.
|