Commit Graph
58 Commits
Author SHA1 Message Date
baldurk 026da176bb Update copyright years to 2021 2021-01-13 13:56:10 +00:00
baldurk 0b0beb3a20 Call virtual functions by explicit class in constructor 2020-08-20 16:11:05 +01:00
baldurk 81fbf4bcc9 Fix some dodgy memcpy calls 2020-08-20 16:11:05 +01:00
baldurk ec6627af03 Use our own isinf/isnan over compiler provided ones that are unreliable
* Due to standards nonsense the availability of isinf/isnan in C++ is quite
  complex and varies a lot between compilers. Trying to access them reliably is
  quite brittle and they're easy to implement with bit-inspection of float
  patterns, so we do that instead.
2020-07-14 13:24:36 +01:00
baldurk 0d026a43d6 Remove CompType::Double
* This is a leftover artifact from before we had general extended type support
  and double was the only non-32 bit type we handled. Now we support most type
  formats so doubles are just CompType::Float with 8 byte width
2020-07-12 10:52:10 +01:00
baldurk 6fcd34dd0d Add missing cast to Vec4u 2020-06-03 18:41:11 +01:00
baldurk 45d15596de Make glGetTexImage blit fallback support more robust. Closes #1907 2020-05-25 16:27:53 +01:00
baldurk e17532c4ed Fix decoding of integer vertex attributes 2020-05-21 17:53:37 +01:00
baldurk 960f0b53eb Add missing include. Closes #1896 2020-05-19 09:38:03 +01:00
baldurk cf039acadc When possible with image viewer, manually unpack unsupported formats
* This is similar to the remapping the replay proxy does, and should support
  most non-compressed formats.
2020-05-18 13:21:55 +01:00
baldurk f622ac36d6 Standardise layout of packed texture formats on disk/network
* We preserve each API's interpretation of bit order for packed formats like
  RGBA4 or R5G6B5 when displaying the raw data in the UI, but when we need to
  proxy it or save to disk, we always transform to D3D's order as standard.
* This allows us to proxy them reliably because we always have a standard bit
  order and APIs that need a different order transform when fetching data to the
  standard format, or setting proxy data from the standard format.
2020-05-18 13:21:55 +01:00
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 CraigandBaldur Karlsson 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 ArntzenandBaldur Karlsson 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 WuandChia-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