Commit graph

357 commits

Author SHA1 Message Date
LaShonda Hopper
d027993ac0 [WL21389] Address code review feedback (details below).
* Renamed squared var to be consistent with format of others in the code base.
* Removed fabsf() that was accidentally left in.
* Reduced squared distance filter within GeometryCache::computeSimpleHullPointListForShape
  as suggested from 0.0025f to recommended 1.0e-6f (1mm^2).

Feedback Link:  https://github.com/highfidelity/hifi/pull/11336#pullrequestreview-70060918

Changes Committed:
    modified:   libraries/render-utils/src/GeometryCache.cpp
2017-10-24 14:16:25 -04:00
LaShonda Hopper
070660eb04 [WL21389] Switch to _positionView & filter dupe verts for ShapeInfo (details below).
* Adjusts GeometryCache::computeSimpleHullPointListForShape to utilize
  ShapeData::_positionView as opposed to _normalView.
** Also filters out duplicate points or points close enough to be considered
   duplicate vertices.  This provides ShapeFactory with better point data
   and should reduce hits to the dedupe pass within createConvexHull.

Tested:
* Octagon & Tetrahedron
** They looked better than the prior commit, behaved closer to their shape as opposed
   to cone or narrow cylinder like.

Note:
* These changes are based on debug info observations using the Octagon and
  discussion with Andrew Meadows via Slack & https://github.com/highfidelity/hifi/pull/11336#pullrequestreview-69939120

Changes Committed:
    modified:   libraries/render-utils/src/GeometryCache.cpp
    modified:   libraries/render-utils/src/GeometryCache.h
2017-10-24 14:16:25 -04:00
LaShonda Hopper
0ad95806e3 [WL21389] Update point list function in line with GeometryCache::ShapeData update.
Changes Committed:
    modified:   libraries/render-utils/src/GeometryCache.cpp
2017-10-24 14:16:24 -04:00
LaShonda Hopper
9d64a3b991 [WL21389] Fixes warnings from last commit (details below).
* Fixes int vs size_t comparison warning within ShapeInfo.
* Fixes unused var warning for shapeVerts local var within GeometryCache.

This should fix the mac & ubuntu builds.

Changes Committed:
    modified:   libraries/render-utils/src/GeometryCache.cpp
    modified:   libraries/shared/src/ShapeInfo.cpp
2017-10-24 14:16:24 -04:00
LaShonda Hopper
7f9ce5a4cd [WL21389][BuildFix] Minor refactor due to render-utils lib change (details below).
As of Commit b93e91b9, render-utils no longer knows about entity lib.
This commit adjusts for that by altering the signature of
GeometryCache::computeSimpleHullPointListForShape to take in portions
of ShapeEntityItem data as opposed to the entity pointer.

Fixes build failure mentioned in:
 https://github.com/highfidelity/hifi/pull/11336#issuecomment-333635794

Reviewed-by: Leander Hasty <leander@1stplayable.com>

Changes Committed:
	modified:   interface/src/Util.cpp
	modified:   libraries/render-utils/src/GeometryCache.cpp
	modified:   libraries/render-utils/src/GeometryCache.h
2017-10-24 14:16:23 -04:00
LaShonda Hopper
789b850846 [WL21389] Addresses feedback from PR #11336.
* Removes todos from ShapeEntityItem::shapeCalculator stub commit.
* Removes defined out debugging, as requested, from GeometryCache::computeSimpleHullPointListForShape.
* Moves cone handling to its own section for better contextual flow.

Changes Committed:
	modified:   libraries/entities/src/ShapeEntityItem.cpp
	modified:   libraries/render-utils/src/GeometryCache.cpp
2017-10-24 14:16:23 -04:00
LaShonda Hopper
8a4ac9ebc4 [WL21389] Resolves size_t vs int warnings in GeometryCache.
Reviewed-by: Kris Pivin <krispivin@1stplayable.com>

Changes Committed:
	modified:   libraries/render-utils/src/GeometryCache.cpp
2017-10-24 14:16:23 -04:00
LaShonda Hopper
070c664ff2 [WL21389] Add out of bounds safeguard to computeShapeInfo helper (details below).
* Switched direct map indexing to helper function which has out of bounds safeguard.
* Also updated GeometryCache::getShapeForEntityShape default fallback return from
  GeometryCache::NUM_SHAPES to GeometryCache::Sphere inline with general preference
  to act as if a shape is a sphere in the event of an error.

Changes Committed:
	modified:   libraries/render-utils/src/GeometryCache.cpp
2017-10-24 14:16:23 -04:00
LaShonda Hopper
5b50b362f1 [WL21389] WL21389 PR2: Representation of collision shapes need updating (details below).
This commit adds support for the polyhedrons and polygons sans
Torus and Quad which aren't currently supported within GeometryCache.

* Moves GeometryCache::_shapes from public to private scope
    * Nothing aside from the class should be directly altering this, only querying
    * Updated instances of direct referencing which looks to have been limited to prior
      testing of instancing and shapes.
* Adds an accessor function for ShapeData to GeometryCache
* Consolidates point list generation to helper function
    * GeometryCache::computeSimpleHullPointListForShape
* Moves GeometryCache::Shape to entity::Shape mapping to GeometryCache from
  RenderableShapeEntityItem
    * Adds conversion accessor to GeometryCache, GeometryCache::Shape getShapeForEntityShape
* Sets ShapeEntityItem::ShapeInfoCalculator callback committed earlier.
    * This helps circumvent the issue with library inclusion.  entity-render knows about
      entity; however, entity doesn't know about entity-renderer; however, GeometryCache
      data is needed within entity::ShapeEntityItem to compose the ShapeInfo point list data.
    * This callback is set up within Application::init of the Interface as it knows about
      both halves of the equation, and the callback needs to be setup prior to any entities
      collision data getting generated.
* Removes _type reset within ShapeInfo::setPointCollection
    * This should avoid any issues due to subversively setting the type or
      incorrectly setting the type as a tangential operation.
        * Audited instances of ShapeInfo::setPointCollection and all seemed to be
          calling the function immediately after having set the type via
          ShapeInfo::setParams
* Adds new ShapeType: SHAPE_TYPE_CIRCLE
    * This type is reserved for the circle which is now treated as a special
      type of Cylinder_Y with regard to collision as opposed to a simple hull.
    * Fixes the issue where jumping on a circle, at times, would
      result in the avatar sliding off towards an edge as if atop a
      squished cone.
* Also updates ShapeInfo::getType() to return ShapeType as opposed to int
    * Auditing calls showed that majority of places were comparing against ShapeType
    * ShapeType::_type is a ShapeType so returning the type explicitly
      is more consistent.
        * ShapeInfo file houses ShapeType enum so any file aware of ShapeInfo is aware of
          ShapeType enumeration.
* entity::Quad defaults to SHAPE_TYPE_ELLIPSOID
    * Like entity::Shape::Torus, entity::Shape::Quad is currently unsupported within
      GeometryCache::buildShapes.
    * Also it appears that a Quad shape can't be created within world via the creation menu.
        * There's no explicit option at present to create one.
        * Trying subvert the Cube/Box creation option to generate one results in an enforced
          stubby box as opposed to a quad.
    * Given the aforementioned points, entity::Shape::Quad will default to
      SHAPE_TYPE_ELLIPSOID as opposed to SHAPE_TYPE_BOX.
        * Added Todo regarding the shape being unsupported along with a notation to create
          a special ShapeType, SHAPE_TYPE_QUAD, for it should it be added in the future.
* Adds some comments and has some minor clean up.

Reviewed-by: Leander Hasty <leander@1stplayable.com>

Changes Committed:
	modified:   interface/src/Application.cpp
	modified:   interface/src/Util.cpp
	modified:   interface/src/Util.h
	modified:   libraries/entities-renderer/src/RenderableShapeEntityItem.cpp
	modified:   libraries/entities/src/ShapeEntityItem.cpp
	modified:   libraries/entities/src/ShapeEntityItem.h
	modified:   libraries/physics/src/ShapeFactory.cpp
	modified:   libraries/render-utils/src/GeometryCache.cpp
	modified:   libraries/render-utils/src/GeometryCache.h
	modified:   libraries/shared/src/ShapeInfo.cpp
	modified:   libraries/shared/src/ShapeInfo.h
	modified:   tests/gpu-test/src/TestInstancedShapes.cpp
2017-10-24 14:16:17 -04:00
Andrew Meadows
d9ba75ca72 fix warning about implicit cast from 64 to 32 bits 2017-10-11 06:07:07 -07:00
Andrew Meadows
886422cbef remove unused variable 2017-10-10 17:07:17 -07:00
Andrew Meadows
4bf99fe9d2 remove unused variable 2017-10-10 17:05:54 -07:00
Andrew Meadows
026195223a more correct use of BufferView in GeometryCache 2017-10-10 17:02:26 -07:00
Bradley Austin Davis
e42068f681 Merge branch 'master' into android_new 2017-09-26 14:31:29 -07:00
Bradley Austin Davis
b93e91b9f3 New android toolchain 2017-09-19 13:45:12 -07:00
SamGondelman
f68a588323 rename isAA isAntiAliased 2017-09-13 10:24:10 -07:00
SamGondelman
1b85a453ab working on text3d overlays and entities 2017-09-12 16:49:51 -07:00
SamGondelman
4a49801217 web overlays and entities are always nonAA 2017-08-24 14:23:21 -07:00
Chris Collins
2456126bcc Merge pull request #11157 from SamGondelman/tabletLayer
Render non-AA overlays correctly
2017-08-18 14:59:20 -07:00
Sam Gateau
d624413c14 Merge pull request #11189 from SamGondelman/line3DFix
Fix drawInFront overlays only rendering in left eye
2017-08-15 09:26:18 -07:00
SamGondelman
194b7d6655 warning 2017-08-14 16:08:07 -07:00
SamGondelman
8163430282 fix depth buffer issue that was messing with drawInFront, plus some small fixes to line3ds 2017-08-14 15:03:14 -07:00
SamGondelman
e4c954e862 merge from master 2017-08-10 16:30:33 -07:00
SamGondelman
353a3e8c68 properly fix AA stenciling 2017-08-10 16:07:40 -07:00
SamGondelman
96b179386f working on fixing non-AA overlays 2017-08-10 16:07:40 -07:00
Olivier Prat
3316be4dea Working fade parameters through instanced draw calls 2017-07-18 17:01:17 +02:00
Olivier Prat
dbf0b64dfb Refactored Fade.slh to take into account differences between instanced draw and normal draw 2017-07-18 12:49:34 +02:00
Olivier Prat
1f14b6ef38 Shape entities have the correct pipeline picked when fading is activated. Still need to support instanced rendering 2017-07-17 17:50:59 +02:00
Olivier Prat
f8b2ffe359 Removed transparency on fading shapes 2017-07-17 15:06:32 +02:00
Olivier Prat
1b8696fdda First draft of custom pipeline on geometry cache 2017-07-13 17:09:49 +02:00
Olivier Prat
06d69d04c3 TransitionStage + FadeJob compiling but not linked to entity events 2017-07-07 18:22:11 +02:00
Olivier Prat
4256a1f2a7 Preparing for merge with stage. DOESN'T COMPILE! 2017-07-07 15:16:20 +02:00
Sam Gateau
d15c4ea2d3 Merging with the stage branch 2017-07-07 15:12:40 +02:00
Sam Gateau
53ffca796f Drafting a better SHape plumber to render the items 2017-07-06 16:35:40 +02:00
Olivier Prat
8a12d0c106 Fade effect working again for basic enter domain but with various Fade jobs 2017-06-29 08:54:23 +02:00
samcake
20d8c11e28 ALmost there, getting eback everything to work with the light and background stages in the scene, not in deferredLighting Effect anymore 2017-06-22 17:54:16 -07:00
Olivier Prat
24d45e0f5b Updated from upstream master because of change of protocol 2017-06-13 10:43:25 +02:00
Liv
7785473ccb moving else 2017-06-09 12:59:08 -07:00
Liv
8c488d95d1 Stylish updates 2017-06-09 11:46:38 -07:00
Liv
1808505d8b Coding standard fixes 2017-06-09 10:54:57 -07:00
Liv
34bd2b8a2b style fix 2017-06-08 09:01:01 -07:00
Olivier Prat
20d4fcbbc7 Fixed fading on skinned objects. Added initialiazeShapePipelines on GeometryCache to postpone simple pipeline creation after initializeGL 2017-06-08 09:24:12 +02:00
Liv
c3bf915fd4 Changing loop to avoid unused warnings 2017-06-07 15:04:39 -07:00
Liv
5579c409e7 Style fix 2017-06-05 18:03:10 -07:00
Liv
42cb2332d5 Remove unimplemented comment on circle 2017-06-05 17:46:13 -07:00
Liv
393aa84a55 Renaming conical to isConical 2017-06-05 17:45:52 -07:00
Liv
e4963e076a Merge branch 'master' of https://github.com/highfidelity/hifi into feat/add-primitive-shapes 2017-06-05 17:38:28 -07:00
samcake
c5e9551bab more cleanup 2017-06-01 18:05:18 -07:00
samcake
9c1e99fe3f Removing cruft and organizing the stencil config 2017-06-01 13:06:22 -07:00
Liv
8bcaacbe40 Removing incomplete torus function 2017-05-31 15:46:35 -07:00
Liv
2808ab4865 Sort of making progress on torus vertex buffer 2017-05-26 10:45:29 -07:00
Liv
10408a0fe4 basic circle function to be used as base for torus 2017-05-25 15:32:49 -07:00
Liv
ffbe39df0a Refactor to add optional conical parameter to existing extrude polygon function 2017-05-25 13:06:24 -07:00
Liv
d3e900e42f Adding first pass on cone shape 2017-05-25 12:54:49 -07:00
Liv
417d9ec80b Surface cylinder option for primitive shape to html 2017-05-25 11:04:25 -07:00
Liv
362e08a90d Add extrudePolygon for cylinder 2017-05-25 10:23:28 -07:00
Sam Cake
29545f0918 FInally bringing all the shader compilation related fuinctions in the Backend in the same cpp, making specialized version based on the Backend 2017-04-13 23:53:56 -07:00
sam
e1aad8bd63 Deep dive into the shape key and filters and the PLumber construction 2017-02-24 00:35:10 -08:00
Anthony J. Thibault
39d68828ab Disable FXAA on tablet overlay in desktop mode.
This introduces the "isAA" property to 3d overlays. When false, the overlay is rendered after
the "Antialiasing" render pass.  Ironically, disabling FXAA makes the text more readable, which is
essential in 2D desktop mode.

Two new shaders were introduced.

simple_opaque_web_browser_overlay.slf
simple_transparent_web_browser_overlay.slf

These are tailored to write into the main framebuffer instead of the g-buffer.
2017-01-30 11:24:59 -08:00
Brad Davis
3074be7ad0 Glow line replacement without geometry shader 2016-11-18 17:42:55 -08:00
Brad Davis
fa841620ab Disable glow line temporarily while fixing implementation 2016-11-16 12:50:47 -08:00
Brad Davis
2705ee7030 Remove the use of implicit ids in geometry cache 2016-10-19 11:18:25 -07:00
Brad Davis
dde79ef3c5 Fix GPU buffer leak in geometry cache / overlays 2016-10-17 12:22:20 -07:00
Anthony J. Thibault
e82f6a90af Improved web entity rendering
* fading now works properly
* web browsers are now fully opaque.
2016-08-25 11:04:23 -07:00
Brad Davis
574737fbb5 More GPU api fixes, protect Buffer::flush 2016-08-12 22:29:04 -07:00
Brad Davis
894d29bb29 Fixing flicking in instance based objects 2016-08-12 22:28:24 -07:00
Brad Hefta-Gaub
a714f325fe Merge pull request #8333 from SamGondelman/miscFixes
Miscellaneous cmake and render engine improvements
2016-08-10 11:06:50 -07:00
SamGondelman
ae9fb3768c CR notes 2016-08-08 17:45:25 -07:00
SamGondelman
130e64aaba remove polyvox fade, possibly fix web fade 2016-08-05 10:36:48 -07:00
SamGondelman
b6e73e06a2 merge from master 2016-08-04 13:34:38 -07:00
SamGondelman
2eb0c7735f working on fading shape entities 2016-08-03 13:30:05 -07:00
SamGondelman
676f4bdfcf misc fixes from particles branch 2016-07-29 15:36:32 -07:00
Anthony Thibault
ea310bcc43 Web Entities now render correctly as well 2016-07-28 14:11:19 -07:00
Anthony J. Thibault
0a35c13a94 Moved creation of pipeline into call_once block 2016-07-25 16:30:29 -07:00
Anthony J. Thibault
fb84f058d6 Fix alpha cut-outs and incorrect gamma on Web3DOverlays 2016-07-25 15:56:05 -07:00
Brad Davis
85b0440e32 Disable glow lines (and the use of geometry shaders) on non-Windows platforms for now 2016-07-23 11:06:33 -07:00
Brad Davis
03cb6175ab Support triangle and hexagon shapes, add shape support to overlays. 2016-07-15 22:02:17 -07:00
Brad Davis
2c72037e81 Fixing warnings 2016-07-09 20:43:31 -07:00
Brad Davis
31948bce2d Support alpha and color gradients in circle overlays 2016-07-09 20:43:30 -07:00
Brad Davis
ae1dd29a7a Fix depth writing for glow lines 2016-07-08 10:27:53 -07:00
Brad Davis
c644c87e69 Fix glow line vanishing, improve transparency interaction 2016-07-07 19:01:41 -07:00
Brad Davis
8ca3630cfa Support glow effect in 3D line overlays 2016-07-07 13:36:48 -07:00
Brad Davis
b7926b8582 Don't render wire geometry with lighting effects 2016-06-30 16:11:05 -07:00
Brad Davis
2c02c963d4 Moving shape definition to a shared location 2016-05-26 12:22:39 -07:00
Brad Davis
2c703e963c More shapes 2016-05-22 19:48:59 -07:00
Brad Davis
cd1e910844 Add a generic shape primitive 2016-05-21 23:46:44 -07:00
samcake
1ec9ef560e Fixing the srgb color format conversion for web entities 2016-05-11 10:46:54 -07:00
samcake
88f816fab4 Adding reflection of the ambient map for translucent 2016-04-28 18:18:18 -07:00
samcake
9d0803e6b8 Merge branch 'master' of https://github.com/highfidelity/hifi into orange 2016-02-23 09:33:54 -08:00
Zach Pomerantz
fd6aa9a78b Add layering to renderGrid, draw edit grid not layered 2016-02-19 13:57:32 -08:00
Zach Pomerantz
9daefbdb94 Fix grid antialiasing 2016-02-19 11:39:11 -08:00
Zach Pomerantz
07a5c7bd16 Update grid shader for major/minor lines 2016-02-19 11:22:01 -08:00
Zach Pomerantz
2bfbf1b5fd Reimplement renderGrid to use frag shader 2016-02-18 11:30:03 -08:00
samcake
71863a1550 Fixing the material names 2016-02-16 09:33:24 -08:00
samcake
0ad7bacf02 Changing diffuse to albedo and breaking everything... 2016-02-15 21:50:10 -08:00
Zach Pomerantz
d9132f3973 Clean up geometry instanced calls 2016-02-05 11:22:45 -08:00
Zach Pomerantz
44d297e7e2 Differentiate named calls by pipeline 2016-02-04 15:32:47 -08:00
Zach Pomerantz
f0797d8ea0 Move instanced pipeline setup to lambda from batch 2016-02-04 15:32:28 -08:00
Zach Pomerantz
cb06d4a9e4 Fix -Wunused-variable for geometry solid stream formats 2016-02-04 10:13:35 -08:00
Zach Pomerantz
a790b09892 Supply normals to GeometryCache draw calls 2016-02-03 19:18:56 -08:00