Commit Graph

18 Commits

Author SHA1 Message Date
293da2ca9a OSX specific: Fixed darker colors of objects inside multi-material gizmo on macOS running on Arm64 CPU.
For Apple's on Arm CPU computed triangle normals inside fragment shader using dFdx and dFdy has the opposite direction. Because of this, objects had darker colors inside the multi-material gizmo.
Based on https://stackoverflow.com/a/66206648, the similar behavior was also spotted on some other devices with Arm CPU.
2021-08-02 14:59:03 +02:00
418d180346 Removed striped shading for sinking objects 2021-07-19 11:37:18 +02:00
14bfc30ec4 Triangle normals and lighting are computed inside the fragment shader for the multi-material painting gizmo.
It results in a six-fold reduction of the amount of data transferred into GPU because there is no need to duplicate vertices for every triangle. Also, normals aren't needed to be transferred to GPU.
2021-07-13 11:23:36 +02:00
2d03e241cf Tech ENABLE_ALLOW_NEGATIVE_Z -> Shading of sinking instances 2021-04-22 13:18:36 +02:00
1d6e984d17 Fixed gouraud fragment shader 2021-02-09 09:59:41 +01:00
ee1cb97ea4 FDM supports gizmo 'autoset by angle' improvements:
- Extra dialog for autosetting by angle in FDM supports gizmo was removed
- Highlighting facets by angle is now controlled by a slider in the main gizmo dialog
- User is allowed to paint even when using the slope highlighter
- The button to turn highlighted facets to blockers was removed, it made no sense
- Highlighted facets are now rendered in light blue
2021-02-08 17:49:36 +01:00
a6d261c888 Some shader compilers did not seemingly like #if XXX blocks
if XXX was not defined. Changed to #ifdef XXX.
2020-12-11 12:27:07 +01:00
9f71626a0a 1) Shader manager: Allow to override #defines programatically
when loading a shader file.
2) Conditional compilation of environmental mapping in gouraud.fs
   using 1)
2020-12-10 13:20:25 +01:00
9d3ca1ca4f ENABLE_SLOPE_RENDERING set as default
Slope rendering active only when using Gizmo FDM supports
2020-10-02 15:43:39 +02:00
e765cebcdd 1st installment of tech ENABLE_ENVIRONMENT_MAP 2020-05-28 15:27:29 +02:00
d0a100971f Fixed shaders on Intel Cards - not allowed use of 'active' word 2020-03-31 12:51:50 +02:00
2c90f5c174 ENABLE_SLOPE_RENDERING - Fixed fragment shader when the thresholds are identical 2020-03-16 08:35:13 +01:00
0647e9c850 New tech ENABLE_SLOPE_RENDERING - 1st installment of rendering objects colored by facets slope 2020-03-13 15:09:07 +01:00
77d1851ace Optimization of the OpenGL shaders for clipping with clipping planes. 2019-04-12 11:01:53 +02:00
2eefbff52b Fixed a literal in vertex shader that refused to compile on OSX 2019-04-08 16:05:18 +02:00
6bd7749192 SLA gizmo clipping plane logic moved to fragment shader
This means the clipping now works again with both legacy and modern OpenGL
2019-04-08 10:31:16 +02:00
4ddce6a2e5 SLA slices preview - wip 3 2018-11-27 14:50:57 +01:00
ea62cb6880 Shaders loaded from files 2018-05-21 13:08:02 +02:00