Commit Graph

172 Commits

Author SHA1 Message Date
d979f1fc62 Workbench: Fix reading and testing from depth buffer 2018-05-05 15:32:48 +02:00
0503f31c66 Cleanup: trailing space 2018-05-04 19:22:38 +02:00
d85fd8feeb T54953: Use OCIO for display color management 2018-05-04 16:27:14 +02:00
3f95daa31f Workbench: Shadows
Initial review of the shard shadows in the workbench engine.

Speed optimizations like transform feedback are not implemented yet. I first want this part to be reviewed and merged.

@fclem please check the note in drw_stencil_set it was holding back nequal == 0 as by default DST.stencil_mask was set to 0. questioin is should we remove the whole check or not.

Also I am still looking for a better name (or split the enum) for DRW_STATE_STENCIL_DEPTH_FAIL_INCR_DECR_WRAP

Reviewers: fclem

Reviewed By: fclem

Tags: #code_quest

Differential Revision: https://developer.blender.org/D3198
2018-05-04 14:08:40 +02:00
d9f4ce617b Cleanup: trailing space 2018-05-03 07:22:04 +02:00
f0d67d8f6a Workbench: Linear => srgb conversion 2018-05-02 17:37:11 +02:00
df3ea82b84 Workbench: GLSL layout locations
Added layout locations
2018-04-26 14:12:39 +02:00
27d837a6ac Workbench: Shader compilation 2018-04-26 08:06:22 +02:00
6c1a121aef Workbench: normal packing
Normal packing. The sign is stored in the A of the color buffer.
if the A == 1.0 the normal should be inverted. before use.

The reason is that packing has more precision for frontfaces, than for
backfaces
2018-04-25 21:33:59 +02:00
fa43886690 Workbench: make normal packing optional 2018-04-25 16:57:18 +02:00
5f97331ffc Workbench: Added studio lighting to view layer 2018-04-25 15:59:15 +02:00
c115021f8b Cleanup: unused vars 2018-04-25 11:59:52 +02:00
8f76d05fa5 Workbench: GLSL performance + code style
- store normal in vec2
 - use rgba_8 for colorBuffer
2018-04-25 11:54:02 +02:00
f938ff1010 Workbench: Dither background color/gradient 2018-04-25 11:30:38 +02:00
35220ccde0 Silhouette Overlap Overlay
Added Object Overlap Overlay

 - Added R32UI support to GPU_framebuffer
 - Added R32U support to draw manager
 - The overlay mode has a object data pass that will render 'needed' data to specific buffers so we can mix them together via a deferred rendering. In future will also add UV's and other data
 - Overlap is implemented as an overlay so it could be used on top of the Scene lighted Solid mode (that will be rendered by Eevee.

Reviewers: fclem, brecht

Reviewed By: fclem

Subscribers: sergey

Tags: #code_quest

Maniphest Tasks: T54726

Differential Revision: https://developer.blender.org/D3174
2018-04-25 11:09:49 +02:00
02f28da187 Cleanup: trailing spaces
Applied to newly added files in 2.8
2018-04-22 08:45:52 +02:00
a305652d87 Workbench: Diffuse studio lighting 2018-04-19 14:48:53 +02:00
a091da7ffa Workbench: reuse similar materials
Similar materials will reuse the same shadergroup. Currently using
a custom hash function that might select too similar colors into the
same material.

Reintroduced the workbench_materials.c this file will be responsible for
material lookup/creation and shader compilation

Fixed a GPUShader mem leak
2018-04-18 13:44:33 +02:00
ccb104b9c2 Workbench: Basic Solid Studio
Currently uses static lighting. Will become HDRI lighting.
Added do_versions to set default drawtype_solid and drawtype_texture to
OB_LIGHTING_STUDIO. When View3D space is created drawtype_solid and
drawtype_texture are also set to OB_LIGHTING_STUDIO.

Current studio lighting uses a dot product to simulate static lighting.
Will need to be changed in the future with different lighting models.
2018-04-18 08:20:12 +02:00
3f762dd764 Workbench: clean up the viewport shading code
- added the drawtype_solid, drawtype_wireframe, drawtype_texture to
View3D
- enabled workbench panels for important render engines
- merged workbench_materials to solid_flat_mode. All draw modes will get
its own fast implementation in the workbench
2018-04-17 22:11:56 +02:00
d26b7592b8 Workbench: Switching Draw engines based on draw mode 2018-04-17 16:34:41 +02:00
e6998b6e62 Workbench: Silhouette shading
Currently it uses the `obj->col`. This needs to be made more intelligent
with fe collection overrides.
2018-04-13 15:49:50 +02:00