df7f69b873
Eevee: Fix SSS energy disapearing with alpha blended material
2019-05-23 15:32:05 +02:00
8b52619ff8
DRW/Eevee: Fix camera texture coordinates in renders
...
This patch fix the issue introduced by recent refactor and fixes
computation when using overscans.
2019-05-22 16:09:10 +02:00
60319e25f2
GPU: Refactor GPU_batch_draw_range_ex
...
Rename it to GPU_batch_draw_advanced and use base instance when possible.
Also add GPU_batch_bind to bind the vao independantly of drawing commands.
2019-05-22 13:29:05 +02:00
45c085a171
DRW: Add DRWView to improve different view handling
...
This will have multiple benefit.
TODO detail benefits (culling, more explicit, handling of clipping planes)
For now the view usage is wrapped to make changes needed more progressive.
2019-05-22 13:29:04 +02:00
fa542237dd
GPU_select_buffer_stride_realign: fix crash when one of the rect's dimensions is 0.
2019-05-21 20:57:03 -03:00
24607a2940
Fix T64758: crash loading certain DDS textures
2019-05-21 13:00:43 +02:00
ee7093689f
GPU: Use uint in GPU_batch_uniform_1ui.
2019-05-20 15:45:35 -03:00
0c4ce8e55e
Eevee / Workbench: Fix hair normals
...
Hair normals were not behaving correctly. This corrects their looks and
fix the node shader geometry that was showing the flat normal.
2019-05-17 18:17:23 +02:00
b526221315
Eevee: Remove the Subsurface Render checkbox
...
This is to simplify the usage of SSS.
Now it automatically detect if there is any SSS material in the view and
allocate the needed buffer if any.
2019-05-17 13:38:42 +02:00
26beaa2d90
Cleanup: Eevee: Use SET_FLAG_FROM_TEST
2019-05-17 13:38:42 +02:00
469f2ec17a
Cleanup: unused vars
2019-05-16 21:17:10 +10:00
a9b393c367
Fix T64678: wrong DDS normal map rendering after recent changes
2019-05-16 12:52:04 +02:00
5005210f40
GPU: Add a matrix unproject function that takes an inverted matrix
...
This is normally already calculated so add a version that takes the
inverted matrix.
2019-05-15 14:16:35 +10:00
987c6da6c0
Eevee: Fix volumetric shaders compilation error
2019-05-14 19:59:07 +02:00
3db428406f
Fix T64601 Error division by zero in GPUVertexFormat
...
The windows compiler use signed int by default for enums so that broke
the bit count I carefully did. Forcing uint fixes it.
2019-05-14 16:31:09 +02:00
0dd5281ab2
GPU: Windows+Intel Selection Fix
...
On Windows 10 with a post Februari 2019 Intel driver, the box selection
is not working. It only detects the object centers, but not the drawn
triangles of the basic engine.
Reviewed By: fclem
Maniphest Tasks: T62947
Differential Revision: https://developer.blender.org/D4857
2019-05-14 14:55:12 +02:00
bf45a46f81
GPU: Fixup and add assert to GPU_VERT_ATTR_NAMES_BUF_LEN
2019-05-14 13:54:05 +02:00
4887b771f9
Cleanup: sort struct declarations
2019-05-14 20:21:22 +10:00
6a4c5b67ec
Cleanup: quiet warning
2019-05-14 20:21:22 +10:00
20421ef952
Cleanup: DRW: Move ModelMatrix declaration to common_view_lib
2019-05-14 10:57:04 +02:00
016fc7f0c2
GPUVertexFormat: Reduce size of structs
...
With this patch, the size of GPUVertFormat goes from 1240 to 388.
2019-05-14 10:57:04 +02:00
20d9cd3a1f
GPU: Add GPU_vertbuf_discard and GPU_BATCH_UNUSED
...
GPU_vertbuf_discard to clear buffer containers in place.
GPU_BATCH_UNUSED to tag batch that are cleared and not immediatly usable.
2019-05-14 10:57:03 +02:00
e5349f14eb
BLI_memblock: Add more options
...
- Use int instead of uint for safety and less conversions.
- Add free callback
- Add cleared alloc option
2019-05-14 10:57:03 +02:00
2d28df783a
GPU: Move Material index to nodetree evaluation
...
This removes the need to pass the Material* all over the place in the draw
manager. Cleanup comming right after.
2019-05-14 10:57:03 +02:00
b13e0568d3
GPU: Remove ModelViewMatrix and ModelViewMatrixInverse usage
2019-05-14 10:57:03 +02:00
8f71a84496
Cycles/Eevee: add Emission and Alpha inputs to Principled BSDF
...
This makes it easier to set up materials with emission and transparency.
Importers/exporters and add-ons are recommended to now use these rather than
creating separate transparent BSDF and emission nodes.
2019-05-13 15:56:11 +02:00
7ad802cf3a
Cycles/Eevee: unified and improved texture image color space handling
...
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
2019-05-13 15:56:10 +02:00
fdddea676d
Cleanup: DRW: Renaming of glsl utility macros
2019-05-10 12:14:41 +02:00
f877022956
Fix T64363 Eevee: Texture coordinates node turns material color to pink
...
Sorry for that :(
2019-05-09 12:46:29 +02:00
60aede44ba
Cleanup: DRW: Remove DRW_pass_free
2019-05-09 01:08:17 +02:00
e2d04229c3
DRW: Remove support for NormalMatrix
2019-05-09 00:27:11 +02:00
c995eb1f9f
Cleanup: GPUShader: Remove unused edge fancy shader
2019-05-08 23:28:07 +02:00
9489fea07b
GPU: Refactor some shader for a bit more efficiency
...
Remove matrices multiplication and use more correct codestyle for variables
2019-05-08 23:28:07 +02:00
7ec7888ff3
Eevee: Fix Tangent vectors using NormalMatrix and make them world space
...
Making them world space by default remove a lot of legacy conversion from
viewspace.
2019-05-08 23:28:06 +02:00
f2f62b184c
DRW: Remove WorldNormalMatrix
2019-05-08 20:13:32 +02:00
7e380fd46a
GPU: Remove GPU_INVERSE_NORMAL_MATRIX
...
The end goal for this is to lower the number of needed matrices.
This also cleanup some uneeded transformation.
2019-05-08 20:13:32 +02:00
3d759e2b09
Cleanup: DRW/GPU: Remove eye vector uniform
2019-05-08 17:52:49 +02:00
cca941f614
Cleanup: GPUShader: Use switch instead of ifs
2019-05-08 17:52:48 +02:00
1ae2385106
GPUViewport: Fix possible hash colision with enabled engines
...
Also fix engine data validation that was not previously not working.
2019-05-08 17:49:28 +02:00
820a64b9e5
DRW: Replace BLI_mempool by BLI_memblock
...
This remove a avoid the big overhead present in BLI_mempool when it is
cleared.
2019-05-08 17:49:28 +02:00
bd340a0e1f
Cleanup: GPUMaterial remove unused struct members
2019-05-06 22:33:05 +02:00
ab9731ccea
Cleanup: fallthrough attribute warning
...
Fall-through without label or default after it.
2019-05-05 12:34:24 +10:00
d32a103d53
Fix T63789: Precision issues in glsl noise texture
...
There is a significant precision loss when converting large float values to int.
2019-05-04 16:46:02 -03:00
e474549da5
Cleanup: GPU_buffers: Remove obsolete debug drawing
2019-05-04 14:11:04 +02:00
1d8ed6dcd7
GPUBuffers: Save / expose material index per buffers
2019-05-04 14:11:04 +02:00
7f366c048a
Fix T63435 Incorrect fresnel and normals for hair strands on EEVEE
2019-05-02 14:32:41 +02:00
909665a0d4
ClangFormat: run with ReflowComments on source/
...
Prepare for enabling ReflowComments.
2019-05-01 11:13:14 +10:00
2445d5abc2
Fix T63393 Eevee: Specular Shader's Clear Coat does not function
2019-04-30 14:07:22 +02:00
14897fb653
Cleanup: spelling
2019-04-29 14:14:14 +10:00
d2f1705b15
Fix T63936 GPUSelect: Read depth in the end
...
fix T63936 introduced in 86914e7133 .
Reviewers: fclem
Reviewed By: fclem
Tags: #bf_blender
Maniphest Tasks: T63936
Differential Revision: https://developer.blender.org/D4750
2019-04-27 20:37:29 +02:00