Commit Graph

47 Commits

Author SHA1 Message Date
baldurk 1db2947c86 Drop constexpr to work around gcc 5 compiler bug 2020-04-15 21:29:19 +01:00
baldurk c3a5d99bc0 Add support for matrix operations (transpose/determinant/inverse) 2020-04-15 20:33:57 +01:00
baldurk 1690d30621 Fix handling of w in Vec4 operators 2020-04-07 18:34:15 +01:00
baldurk fc2181d625 Fetch and apply pixel inputs and derivatives to quad 2020-04-03 17:17:46 +01:00
baldurk 6f2dfc1a2b Add support for non-compressed formats in DDS shell preview 2020-04-01 16:55:58 +01:00
baldurk ad44e4dcb6 Fix ConvertComponents and add some unit tests 2020-03-18 17:34:59 +00:00
baldurk 028364910e Refactor ConvertComponent to ConvertComponents
* This way it can ensure that alpha components aren't sRGB corrected, as well as
  handling BGRA swaps and some common packed formats.
2020-03-17 10:39:11 +00:00
baldurk 936e6372cb Remove use of 3rdparty/ prefix from includes
* We instead always have 3rdparty/ in the relevant include search paths and rely
  on that. Each library still has its own unique base dir within 3rdparty to
  clarify where the include is coming from.
2020-03-11 18:00:53 +00:00
baldurk 4a779e371b Add bracketing to macro use of parameters 2020-01-21 18:28:56 +00:00
Daniel Craig b3d15996b2 Add headers required to build windows files without precompiled header 2020-01-13 13:02:46 +00:00
baldurk 7771c4bf1c Add compile fixes for VS2019 2020-01-06 16:25:34 +00:00
baldurk 2916c0f9f7 Update copyright years to 2020 2020-01-06 16:20:45 +00:00
baldurk c4ca8cb1d1 Reduce reliance on big public headers where possible
* Mostly moving includes from common headers to cpp where possible, and removing
  includes of the whole thing where only enums or rdcstr etc are needed.
2019-12-16 17:06:16 +00:00
baldurk f68645bddc Reduce dependencies pulled in by common.h 2019-12-16 17:06:16 +00:00
baldurk ff08748238 Ensure all files have trailing new-lines and enforce with clang warning 2019-12-02 20:28:05 +00:00
baldurk 78fba8ec57 Fix linux build 2019-09-18 19:33:37 +01:00
baldurk af97e50b3a Implement ConvertToR11G11B10(), add conversion tests 2019-09-18 19:25:11 +01:00
baldurk d4d21ce736 Use texture viewer background color for 'clear before X' overlays 2019-07-11 17:05:58 +01:00
baldurk 11819ed3be Refactor and clean up internal shaders to be better organised
* Split up old uber-cbuffers used for unrelated shaders into shader-specific
  cbuffers (DebugPixelCBufferData -> TexDisplayPSCBuffer / CheckerboardCBuffer /
  MeshPixelCBuffer).
* Split up HLSL files so not everything is lumped into 'debugdisplay.hlsl' but
  has separate files as appropriate.
* Use #include in GLSL and HLSL to better organise shader code together rather
  than relying on lumping files together on the C++ side.
* Renamed files like 'debugcbuffers.h' to 'hlsl_cbuffers.h'.
* Trimmed out some extensions/cruft that isn't needed in the GLSL side since we
  no longer use separable shaders.
* Combine some shaders like Outline/Checkerboard that were similar into central
  place.
2019-02-13 18:50:53 +00:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
baldurk 62ba684567 Move Vec4u to a global struct next to Vec4f 2018-12-13 23:43:07 +00:00
baldurk 57caf01394 Refactor heatmap for quad overdraw/triangle size to be applied late
* Instead of baking these into the overlay texture and trying to decode them
  afterwards, we instead write a grayscale 16F value into the overlay texture,
  and add a special decode display mode that will use the heatmap and bucketing
  provided.
* This means that saving these overlay textures now saves grayscale. When saving
  to an 8-bit format, we remap to 0-255 so that greater than 1.0 values are
  mapped lower.
2018-11-01 12:23:12 +00:00
Hans-Kristian Arntzen 5bf0ae3624 Implement RGB10A2SNorm conversion for postvs. 2018-05-12 21:03:01 +01:00
baldurk 96629e8e96 Unpack non-texel-buffer compatible formats when doing Post-VS on vulkan
* We were already fetching and compacting vertex buffers so this wasn't
  as big a change as expected - it just needs to expand out e.g.
  R16G16B16A16_SNORM to R32G32B32A32_SFLOAT so that it can be created
  as a texel buffer (where the former may only be supported via fixed
  function vertex inputs).
2018-04-09 17:11:26 +01:00
baldurk e305029ddd Update copyright years to 2018 2018-01-01 17:55:29 +00:00
baldurk 00e06d8ff1 Make display rendering colours theme-aware.
* In particular this removes hard-coded checkerboard colours that don't
  look right on dark themes.
2017-08-28 18:50:17 +01:00
baldurk 2f6dffffc5 Expose camera class properly, drop Camera_* entry points from Qt UI 2017-07-17 16:34:12 +01:00
baldurk 95f366344a Rename parameters near/far to avoid conflicts with macros from windows.h 2017-04-28 18:36:54 +01:00
baldurk f98be940ad Fix trying to save images of a typeless format without type hint given 2017-02-21 12:01:21 +00:00
baldurk 030cbfde9a Batch update copyright years everywhere 2017-01-06 12:13:31 +00:00
baldurk 64db4e6e8e Use a union to return NaN constant from ConvertFromHalf. Refs #274 2016-05-29 10:32:02 +02:00
baldurk 5f28b745a2 Format code according to newly added clang-format
_  /)
                 mo / )
                 |/)\)
                  /\_
                  \__|=
                 (    )
                 __)(__
           _____/      \\_____
          |  _     ___   _   ||
          | | \     |   | \  ||
          | |  |    |   |  | ||
          | |_/     |   |_/  ||
          | | \     |   |    ||
          | |  \    |   |    ||
          | |   \. _|_. | .  ||
          |                  ||
          |repository history||
          |                  ||
  *       | *   **    * **   |**      **
   \))ejm97/.,(//,,..,,\||(,,.,\\,.((//
2016-05-22 19:41:53 +02:00
Chia-I Wu e6559843ee Fix -Wignored-qualifiers warnings 2016-03-12 06:29:19 +08:00
baldurk 2e0ffa7813 Batch update copyright years everywhere 2016-02-07 18:50:45 +01:00
baldurk ae91bdcde2 Add detection/support for reverse-z projection matrices. Refs #169 2016-01-20 19:58:24 +01:00
baldurk 4c988e9e3a Better arcball controls in the mesh viewer
* Tweaked flycam a bit too, but not much.
* Refactored the API/C# side camera classes to avoid exposing a ton of
  stuff just to do relative rotations in the arcball via quaternions.
2015-07-07 15:38:00 +02:00
baldurk edda31248f Render bounding box around mesh, centre & scale arcball on bbox
* The arcball lookat position can also be dragged with alt-click or
  middle click.
* Also supports other elements as position not just magically-selected
  "POSITION" element.
2015-07-06 19:58:45 +02:00
baldurk 6cd1f70bb6 Fix several warnings for compiling on VS2015
* Note at the time of committing there are still some warnings in MS
  headers that you might need to suppress in a couple of files.
* 3rd party code just has the warnings suppressed for ease of merging.
* The majority of warning fixes were for local variables shadowing
  other locals, function parameters, or members. In most cases they
  weren't a problem, but in some cases it was potentially dangerous!
2015-03-13 10:16:19 +00:00
baldurk 4a3217fdcc Be cheeky and pack extra overdraw levels into slight colour changes
* Since we decode the visual colours into an integer by looking them up
  in the overdraw ramp rather than re-running to get an integer return,
  we make some invisibly subtly different colours above the highest
  overdraw colour, and use these to tell overdraw levels above 20.
2015-02-12 17:02:46 +00:00
Dzmitry Malyshau 2cf42bd889 minor build fix for Linux 2014-11-27 21:44:34 -05:00
baldurk d4bc4e2999 Fix R11G11B10 decode - it's a truncated half format
* ie. not just an unnormalised mantissa plus biased exponent, it has proper
  IEEE style float properties with hidden bit on the mantissa etc. So full
  decoding is necessary, contrary to what some of the docs say :(.
2014-11-27 00:49:05 +00:00
baldurk faeb047211 Handle vtx highlights outside UI, for complex topologies. Refs #85 2014-09-28 02:24:57 +01:00
baldurk 0532e4e8d6 clang compile fixes 2014-08-25 17:16:07 +01:00
baldurk 55e0178ec9 Add quad overdraw mode. Thanks Stephen Hill (@self_shadow)!
* http://blog.selfshadow.com/2012/11/12/counting-quads/
* Quad Overdraw based on ScenePS4 from the revised implementation. The
  colours are new, up to 20 levels. Picking pixels shows the overdraw level
* Available per-pass and per-drawcall, a pass defined the same way as in
  the mesh view, drawcalls since last clear or RT change.
* List of events now passed through to RenderOverlay the same as RenderMesh
2014-08-17 15:28:51 +01:00
baldurk 85a4a8cccd Add uint8_t -> float SRGB conversion function (using LUT) 2014-07-13 18:55:03 +01:00
Rasmus Christian Pedersen cf27eb36d5 camera: minor constness
This commit fixes constness of camera getters, and changes a few
arguments into const references.
2014-05-07 13:13:45 +02:00
baldurk c38affcded Initial commit of existing code.
* All renderdoc code up to this point was written by me, history is available by request
2014-05-02 08:33:01 +01:00