Commit Graph

318 Commits (63b6bcf38d472fa08619d2f9d8fc62bdd1cb6b98)

Author SHA1 Message Date
Tomasz Kapuściński 63b6bcf38d Improved shadow quality
* Default shadow texture is 2048
* Worse shadows use single region
* Always use object shadowing
2023-08-09 12:41:01 +02:00
Tomasz Kapuściński 83b9ded0dc Merge branch 'dev' into dev-graphics-overhaul 2023-08-08 01:01:57 +02:00
Tomasz Kapuściński a16771425a Updated license headers 2023-08-06 23:15:48 +02:00
Tomasz Kapuściński 4531dc432e Merge branch 'dev' into dev-graphics-overhaul 2023-04-14 23:41:28 +02:00
olokos f60c62f05d Graphics - Engine - Fix pause blur for new SDL 2023-02-06 17:53:56 +01:00
Tomasz Kapuściński e3ba33a508 Rewritten CModelMesh to use separate vertex attributes 2022-11-12 18:52:21 +01:00
Tomasz Kapuściński 3805851255 Made recolor a separate material attribute and added more color types 2022-07-09 12:23:50 +02:00
Tomasz Kapuściński a88d9cdd39 Implemented shader-side recoloring in HSV and added more material tags 2022-06-18 22:18:25 +02:00
Tomasz Kapuściński 56e0c915b5 Cleanup in texture structures and enums, added wrap mode to TextureCreateParams and fixed wrap mode in foreground texture (lens flare effect) 2022-05-08 18:23:37 +02:00
Tomasz Kapuściński cac34e259b Cleanup to reduce includes of device.h header file 2022-05-02 20:59:44 +02:00
Tomasz Kapuściński 013d3cccf4 Changed team recolor to replace material albedo color instead of multiply by it for design convenience 2022-04-23 10:53:25 +02:00
Tomasz Kapuściński 640cde1653 Various improvements and fixes
* Added strength parameter for ambient occlusion
* Added proper support for material and emissive textures
* Added team-based recoloring, uses "team" tag
* Changed shadow ranges to make close-up shadows much better
* Fixed background coloring
* Added proper defaulting for glTF values
* Fixed parsing of emissive values
* Added normalization of normals in vertex shaders of object and terrain renderers
2022-04-07 01:11:23 +02:00
Tomasz Kapuściński 4a16ee76a1 Partially refactored model and mesh structures 2022-03-11 19:49:03 +01:00
Tomasz Kapuściński 2d9db9c90a Refactored lighting in terrain renderer and rewritten drawing terrain to include all PBR properties 2022-03-09 20:47:44 +01:00
Tomasz Kapuściński 1a7346b845 A couple of fixes for rendering states 2022-03-09 16:59:23 +01:00
Tomasz Kapuściński 8533be8d5c Replaced MakeUnique and MakeUniqueArray with std::make_unique 2022-02-26 18:48:51 +01:00
Tomasz Kapuściński baa616050a Some refactors to reduce extensive recompilation cascades
Renamed AlphaMode::OPAQUE to AlphaMode::NONE due to clash with preprocessor define
Moved Gfx::EngineTriangle to a separate file
2022-02-26 02:39:13 +01:00
Tomasz Kapuściński e839f0dec7 Extended Material structure with PBR material attributes and added some of them to object renderer
Moved PBR lighting calculations to a separate shader source file
Removed some unused stuff
2022-02-26 01:16:36 +01:00
Tomasz Kapuściński 3168bf4350 Small cleanup 2022-02-25 21:07:01 +01:00
Tomasz Kapuściński c378009128 Feature-breaking refactors
* Partially filled Material structure, currently only base attributes
* Removed recoloring of textures and team variants
* Removed one base object tier in engine structures
* Removed EngineRenderState
* Rewritten some code to better coding style
2022-02-13 00:03:46 +01:00
Tomasz Kapuściński aacc2d0596 Moved non-CRenderer-specific functionality back to CDevice and refactored some of the state change methods
Rewritten control rendering code to use improved way of sending geometry to GPU memory
2022-02-05 19:07:46 +01:00
Tomasz Kapuściński 074706e7ec Removed Vertex and VertexCol structures 2022-02-04 01:22:27 +01:00
Tomasz Kapuściński 750a470b9a Minor color refactors, added DrawPrimitives, rewritten remaining effect rendering 2022-02-04 01:00:18 +01:00
Tomasz Kapuściński 37bdc8665f Removed remaining rendering code from CGL33Device and fixed some issues 2022-02-03 20:53:53 +01:00
Tomasz Kapuściński 1a190b7f6f Partial refactor of UI rendering to improve performance and fix transparency issues
Disabled rendering via CDevice
2022-02-03 18:40:58 +01:00
Tomasz Kapuściński 0908e10ff6 Removed material, lighting, fog and shadowing code from CDevice 2022-02-02 19:09:38 +01:00
Tomasz Kapuściński 7d9badb542 Added UV transform and rewritten animated texture mapping code to use it 2022-02-02 18:13:21 +01:00
Tomasz Kapuściński 741d5c75ba Refactored shadow framebuffer creation and binding 2022-01-24 23:16:22 +01:00
Tomasz Kapuściński 2ff722eee6 Refactored or removed some of the unused CDevice features 2022-01-24 22:29:39 +01:00
Tomasz Kapuściński 39b6621463 Renamed transparency to ghost mode 2022-01-24 21:57:56 +01:00
Tomasz Kapuściński 9a07c1d858 Refactored background, cloud and planet rendering, fixed shadow settings 2022-01-24 21:50:45 +01:00
Tomasz Kapuściński cba70fc912 Added DrawPrimitive() to CObjectRenderer and used it for rendering water 2022-01-22 00:57:00 +01:00
Tomasz Kapuściński 048393f448 Added CParticleRenderer and reimplemented particle rendering code to use it 2022-01-20 21:38:58 +01:00
Tomasz Kapuściński 710f448477 Partially fixed rendering of models in front of the interface (e.g. profile screen) 2022-01-19 23:14:03 +01:00
Tomasz Kapuściński 5dacb82b22 Partial refactor of model I/O
* Mostly removed legacy Gfx::Material usage
* Bake legacy diffuse color to vertex color
* Removed code that writes to old model formats
2022-01-19 19:46:39 +01:00
Tomasz Kapuściński a54a59146d Corrected transparency mode 2022-01-19 17:14:27 +01:00
Tomasz Kapuściński a1ea633a3e Refactored EngineTextureMapping into enum class 2022-01-18 20:14:07 +01:00
Tomasz Kapuściński 68a222e03a Refactored EngineShadowType to enum class 2022-01-18 19:42:19 +01:00
Tomasz Kapuściński 67bd982969 Refactored EngineTriangleType into enum class 2022-01-18 19:29:36 +01:00
Tomasz Kapuściński 754684bfe9 Refactored MatrixVectorMultiply(), added TransformDivide() for cases where perspective divide is needed 2022-01-05 19:22:57 +01:00
Tomasz Kapuściński 9c37f6cbd5 Fully refactored Math::Matrix, removed matrix.h and moved remaining functions to other files 2022-01-05 19:12:35 +01:00
Tomasz Kapuściński 208f142cd2 Made Math::Matrix an alias to glm::mat4, partial refactors 2022-01-05 00:35:41 +01:00
Tomasz Kapuściński 0bba168f94 Removed vector.h, refactored redundant functions and moved remaining ones to func.h 2022-01-04 20:43:36 +01:00
Tomasz Kapuściński db3b1d74d1 Refactored unnecessary Normalize, DotProduct, CrossProduct and Clamp functions 2022-01-04 02:10:36 +01:00
Tomasz Kapuściński d25d6124a9 Changed Math::Vector into alias to glm::vec3 2021-12-28 23:01:30 +01:00
Tomasz Kapuściński 431416d75e Refactored Math::Point in CEngine 2021-12-24 20:25:38 +01:00
Tomasz Kapuściński b36ec266f0 Refactored Math::Point from vertex types 2021-12-24 00:57:04 +01:00
Tomasz Kapuściński c0d067d24b Changed Math::Point into alias to glm::vec2, minor refactors 2021-12-24 00:11:12 +01:00
Tomasz Kapuściński 55c692e8bb Refactored Math::IntPoint in CEngine and CParticle 2021-12-23 23:08:56 +01:00
Tomasz Kapuściński 0207669d61 Added optional triplanar mapping mode for the secondary texture 2021-12-14 21:54:19 +01:00