Commit Graph

288 Commits

Author SHA1 Message Date
Mario Luzeiro b33e42ef2c Soft plastic textures 2016-12-22 16:18:30 -05:00
Mario Luzeiro ad2458056a Improvements on 3DViewer raytracing render
+ Implement sRGB to Linear and Linear to sRGB conversions.
+ Fix an issue in the AntiAliasing adaptive logic.
+ Improves the ambient color use on the shader.
+ Improves post-shader calculation. Fixes the saturated dark regions.
+ Improves the transparency of soldermak material.
2016-12-22 16:18:20 -05:00
Mario Luzeiro 86dcfeb69d improve anti-aliasing
+re-implement anti-aliasing, making it more acurate, not blured, better
and much faster (unsing much less lines of code)
+rewrite some function on camera and raypacket.
+small improvements on raytracing realtime, remove useless ifs
comparisons.
2016-10-27 10:22:21 -04:00
Simon Richter 6000336fe7 Add missing include
std::iota is defined in <numeric>
2016-10-10 19:44:46 -04:00
Mario Luzeiro 6d27087053 Improve board texture (make it square), add directional light to top/bot. 2016-10-09 11:34:28 -04:00
Mario Luzeiro f59bde8cc3 Improve brushed and plastic textures 2016-10-09 11:34:20 -04:00
Mario Luzeiro ae8c62843e Raytracing: implement brushed metal perturbator 2016-10-09 11:34:09 -04:00
Mario Luzeiro 995fde8d9c (forget to staged modified files) 2016-10-09 11:33:53 -04:00
Mario Luzeiro 8493a2f6d5 Raytracing: implement textures based on normal perturbation
Implement normal perturbation for black epoxy and color plastic.
Fix some UI issues in 3D-Viewer (menu options was not proper saved or
updated)
2016-10-09 11:33:25 -04:00
Mario Luzeiro ee71875b4b Implement normal perturbation materials on raytracing 2016-10-09 11:33:16 -04:00
Mario Luzeiro 89bb47ede6 Improve shadow on postshader and add a gamma sRGB color space convertion 2016-10-09 11:33:09 -04:00
Mario Luzeiro 49dce5d191 Improve shadow calculation on Raytracing
Makes it not so dark.
Speed optimization on post shader calculation.
2016-10-09 11:32:59 -04:00
Chris Pavlina 278ee7da7d Remove deprecated 'register' storage spec 2016-09-30 22:32:24 -04:00
Simon Richter 59c81976dc Explicitly mark overriding functions. 2016-09-24 14:53:15 -04:00
José Ignacio Romero cd976d36b7 Use a symmetrical clip plane for the orthographic projection 2016-09-07 01:12:01 -04:00
José Ignacio Romero df40159ce7 Pixel perfect panning for the 3D viewer
Use the correct math to unproject the mouse movement from screen space
to the Z=0 plane on the camera space. This handles both perspective
and orthographic projection at any window size or zoom level.
2016-09-06 20:10:51 -04:00
Chris Pavlina 9740d5e433 Fix nonstandard, unsigned OpenMP loop counter
OpenMP does not yet permit unsigned loop counters. Most compilers seem
to allow them anyway, but a few have been seen to complain.

Mistake introduced in:
    commit 82ed0fde32
    Author: Chris Pavlina <pavlina.chris@gmail.com>
    Date:   Sun Aug 28 02:05:49 2016 -0400

    Fix shared data access in raytracer, tidy up render loop
2016-09-04 21:41:09 -04:00
Chris Pavlina 82ed0fde32 Fix shared data access in raytracer, tidy up render loop
Render loop lost track of which blocks had been rendered due to a
synchronization issue. Specifically, std::vector<bool> is special-cased
as a bitfield and so is pretty much guaranteed not to be atomic unless
synchronized externally.

Also:

- Clean up types of a few variables
- Clean up openmp sharing type of variables (may result in better
  optimization)
- Replace shared rendered block count with an openmp reduction (results
  in fewer locks)

Fixes: lp:1608289
* https://bugs.launchpad.net/kicad/+bug/1608289
2016-08-28 02:13:55 -04:00
jean-pierre charras f029047a97 Uncrustify cbbox_ray.cpp to avoid a lot of warnings on gcc 6.1 2016-07-27 14:52:04 +02:00
Mrio Luzeiro d8eab321f7 3D Viewer: complete refactor of the 3D viewer.
* Split and rewrite the preview window and canvas.
* Create a new class for handling the board information.
* Adds new render targets: openGL, legacy, and ray tracing.
* Render targets take full advantage of the new 3D plugins system and 3D cache
  for a fast 3D model loading.
* Faster board loading.
* New OpenGL render is faster than the old one.
* New ray tracing render target with a post processing shader.
* Use of new 3D plugins (WRL, X3D, STEP and IGES) and 3D model caching.
* Preview of 3D model while browsing the file name.
* 3D preview of the footprint while adding / align 3D shapes.
* Render of 3D models according to attributes: Normal, Normal+Insert, Virtual.
* Pivot rotation centered in one point over the PCB board.
* Shortcuts keys improved for XYZ orientation..
* Animated camera.
2016-07-19 13:35:25 -04:00
Jon Neal 1293d04a7a Fix a bunch of misspellings of length. 2016-07-10 23:09:18 -04:00
Maciej Suminski 71aade6b51 Fixed a few warnings (mostly gcc6 -Wmisleading-indent). 2016-06-07 14:42:42 +02:00
jean-pierre charras a4658ab6be Fix a few compil warnings (not used vars, shadowed local vars) 2016-06-01 14:22:05 +02:00
Chris Pavlina 5904e4c942 Correct handling of unused parameter
Coverity: CID 143742
2016-05-10 23:25:53 -04:00
Chris Pavlina ec67218b5a Remove unneeded 'new' and NULL check
Coverity CID: 143743
2016-05-10 22:36:44 -04:00
Cirilo Bernardo c2a60d14d7 3D: fix issues reported by Coverity scan
*** CID 143752:  Incorrect expression  (USELESS_CALL)
*** CID 143751:  Incorrect expression  (UNUSED_VALUE)
*** CID 143749:  Uninitialized members  (UNINIT_CTOR)
*** CID 143748:  Uninitialized members  (UNINIT_CTOR)
*** CID 143747:  Uninitialized members  (UNINIT_CTOR)
*** CID 143746:  Uninitialized members  (UNINIT_CTOR)
*** CID 143745:  Uninitialized members  (UNINIT_CTOR)
*** CID 143744:  Uninitialized members  (UNINIT_CTOR)
*** CID 143740:  Null pointer dereferences  (NULL_RETURNS)
*** CID 143739:  Memory - corruptions  (MISMATCHED_ITERATOR)
*** CID 143735:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
*** CID 143734:  Error handling issues  (CHECKED_RETURN)
2016-04-06 21:41:52 -04:00
jean-pierre charras d18cdf1c53 merge 3d_initial_merge branch 2016-04-05 19:56:01 +02:00
Cirilo Bernardo 20b40aba1c Fixed bad delete/delete [] invocations and other warnings and errors as suggested by cppcheck 2016-04-05 20:32:22 +10:00
Bernhard Stegmaier 5b0a250609 Fix compilation and install for OSX plus general code cleanup 2016-03-01 10:08:19 +11:00
Cirilo Bernardo b2bdca4b7b Remove wxASSERT in new cbbox code which was a nuisance to the legacy 3DViewer 2016-02-25 09:52:00 +11:00
Cirilo Bernardo f247b05b3e Merged Mario's fix to Material + per-vertex colors and transparency 2016-02-16 08:07:17 +11:00
Cirilo Bernardo 86635aeb23 Manually select changes from Mario Luzeiro's branch to fix model lighting in the preview window. 2016-02-04 12:16:19 +11:00
Cirilo Bernardo d519df22ca Change parameter type to accommodate expected integer range 2016-01-14 13:50:16 +11:00
Cirilo Bernardo 70be4e8f7f + Reverted accidental edit of sg_node.cpp
+ Fixed invocation of SHAPE_POLY_SET::Simplify() to match changes in main
2015-12-19 17:53:07 +11:00
Cirilo Bernardo 4e12999fa8 Removed some trailing white space. Fixed FindGLM. 2015-12-10 11:31:44 +11:00
Cirilo Bernardo ac3acb0061 Moving headers to facilitate support for building 3D plugins out-of-tree 2015-12-09 18:30:48 +11:00
Cirilo Bernardo a0597c4614 GUI improvements including interactive update of model orientation/position 2015-12-09 16:43:30 +11:00
Mario Luzeiro 69cc788e8e + Removed glm source from kicad tree (Maciej / Cirilo)
+ Added renderer for 3D model preview (Mario)
+ Added 3d_cache including name resolver and modifications to 3D model dialogs (Cirilo)
2015-12-08 18:31:57 +11:00