Commit Graph

25 Commits

Author SHA1 Message Date
Alexis Maiquez
7bffcded09
feat: make custom version of glslang to improve shader compatibility + random improvements (#291)
* feat: added glslang and spirv-core for handling shaders, should provide better results than current systems

* fix: brought back proper include placement, should fix some shaders not working

* chore: dial down required version to 330

* fix: crash when taking screenshot

* fix: use glReadnPixels for X11 copying to be more memory safe

* chore: reverted part of last commit

* chore: delay initialization of browser until it's used once

* chore: do not initialize web browser unless explicitly needed

* chore: cleanup filesystem functions to use containers directly

* chore: memory cleanup fixes

* chore: fix glReadPixels for older opengl versions

* chore: remove shader patches as they shouldn't be needed anymore

* chore: initialise variables

* chore: update deps, actions and readme

* chore: make use of custon glslang and SPIRV-Cross

* Revert "chore: update deps, actions and readme"

This reverts commit c3fbc9340b.

* chore: update actions to include submodules

* chore: do not depend on SPIRV-Tools

* fix: added log10 macro

* feat: update to latest glslang (swizzle and vec2/vec3/vec4 implicit casting to float)

* revert: delayed initialization of cef was causing issues, reverted

* chore: re-organized web wallpaper support to use custom scheme and better handle multiprocessing

* chore: make use of external repos for all deps instead of copying things manually and more cleanup work

* chore: wrong include file used in CGLSLContext.cpp

* chore: fix wayland generation folder not being present

* feat: somewhat support TEXB0004

* chore: improve function call matching and fallback to more lax method if no function is found

* chore: changed shader compilation slightly so they're passed onto glsl just once

* feat: swap android's fft implementation (which wasn't right) with kissfft's and fix update frequency issues

* chore: added missing dependency

* chore: added missing dep to PKGBUILD

* feat: add testing tools to run over all backgrounds and getting output data

* chore: jail CDirectory to the basepath and prevent accessing data outside of the main directory

* chore: process script now scales the previews so the html file is not too big

* chore: add showcase gallery to the README.md

* chore: update README

* chore: some readability improvements on code

* chore: fix segfault after code cleanup

* chore: make use of std::filesystem::canonical instead of basepath and slight typing changes on texture objects

* chore: fix path detection being wrong, make use of std::filesystem::path on CContainers

* chore: cleanup of the core part of the project

* chore: bring back std::move and make some methods const where it makes sense

* feat: added a pretty printer for easier debug and comparison between different versions of linux-wallpaperengine

* chore: refactored shader compilation code once more to be easier to follow and fixed the longstanding bug of #include not being added in the right place

* chore: more debug info for the pretty printer

* fix: some textures applied were not the right ones

* chore: properly set combos based on textures

* feat: take into account project properties for shader values
feat: proper parsing of combo values in shaders
fix: shader units weren't linked as they should
chore: more support for detecting shader things automatically

* fix: blending mode for passes using the wrong value
fix: shader uniforms from project properties should now be taken into account

* chore: use ubuntu 22 and ubuntu 24 as builders, ubuntu 20 is retired

* chore: use ubuntu 22 and ubuntu 24 as builders, ubuntu 20 is retired

* chore: hopefully fix github actions build

* refactor: simplified working with properties, constants and shader variables

* chore: remove a couple of todos that aren't needed anymore

* chore: simplify the texture detection a little bit, still work left to do

* fix: regression on texture setup not working properly

* fix: filenames with dots were not being handled properly

* chore: remove some uselesss messages

* chore: fixed std::string json values not casting anything to it as it was assumed

* fix: null user value for constants means it cannot be modified by the user

* chore: remove exception when a shader constant uses a non-existant property

* fix: angles can be an user setting too, also added detection for animation frames to show a warning

* fix: ensure variable information is not commented out by a line comment

* fix: shader includes weren't being processed properly

* chore: update to latest glslang and SPIRV-Cross to support non-integer array indices

* chore: make use of auto where it made sense

* feat: make use of in/out promotion on glslang-WallpaperEngine
feat: use glslang-WallpaperEngine linkin process as an extra validation

* chore: improve scripts for running the app

* chore: hide background structure dump behind a command-line switch

* chore: rewritten bloom effect as a json object inside C++ so it's easier to follow

* chore: removed deprecated parameters and switched to argparse instead of getopt
fix: clamping mode wasn't applied by background properly, only globally

* chore: removed help prompt from the output unless actually required

* fix: web subprocesses weren't launching due to parameter's parsing, temporal fix

* feat: added material command copy support

* feat: do not initialize some subsystems if they're disabled or not used by backgrounds

* chore: ignore type in combos as only seems to be used in the editor

* chore: update to latest glslang-WallpaperEngine changes

* chore: delete uniforms if they already exist before setting

* chore: more cleanup and fixes

* chore: more cleanup and fixes

* chore: more cleanup and fixes

* chore: update file functions to make use of shared_ptr/unique_ptr instead of copying things around

* chore: more changes to unique_ptr and shared_ptr

* chore: more changes to unique_ptr and shared_ptr

* chore: more changes to unique_ptr and shared_ptr
feat: improved render initialization process to make it easier and simpler to add new drivers (no more #ifdef in CWallpaperApplication.cpp)

* chore: change all is/as castings to use typeid so no string comparison takes place

* chore: more cleanup, default initialization of values wherever possible

* chore: moved more things to std::unique_ptr and std::shared_ptr

* chore: moved more things to std::unique_ptr and std::shared_ptr

* fix: browser context usage crashed the app

* chore: the setting controls fullscreen detection creation the same way audio works

* fix: ensure that at least one frame is rendered before detecting fullscreen windows

* chore: slight changes to output and documentation to properly reflect current build configuration

* chore: fix mipmap texture creation

* chore: fix pass uniforms not taking into account fragment shader's uniforms
chore: keep processed code in the shader sent to opengl so it appears on RenderDoc

* chore: formating issues by codefactor

* chore: do not use new to allocate the pretty printer

* fix: strchr wasn't properly done for window geometry

* chore: add recording mode for status page generation

* chore: update .gitignore

* chore: update script to make use of video generation instead of the old python scripts

* chore: also copy project.json so it can be used on the site too

* fix: regression on invisible images not being rendered

* feat: add option to disable camera parallax

* chore: add the reversing tools I have locally

* chore: mention some of the common issues in the README.md

* chore: take submodules into account for archlinux

* chore: missed cd "$pkgname" in arch's prepare step
2025-05-10 19:34:59 +02:00
Alexis Maiquez
b8fd1eefac chore: clang-format and code formatting done with an extra of code cleanup
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-12-14 02:20:34 +01:00
Alexis Maiquez
732c60da46 More code cleanups
Update .clang-format

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-08 18:48:19 +01:00
Alexis Maiquez
9bb0a40bc5 Simplified usage of jsonFindUserConfig
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-05 06:29:01 +01:00
Alexis Maiquez
d370e028ff Renamed CContext to CRenderContext to allow for the introduction of CAudioContext in following iterations
Improved logging and error reporting to be a bit more flexible

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-03 00:00:17 +01:00
Alexis Maiquez
92bdde2bd1 Renamed CUserSettingColor to CUserSettingVector3 as it makes more sense
CUserSettingVector3 are initializable with just one float value
Objects' origin and scale are now UserSettings too

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-01 03:10:38 +01:00
Alexis Maiquez
fdd5bcb0b5 Removed old jsonFindUserConfig and updated to a new version using the CUserSetting classes
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-01 02:36:29 +01:00
Alexis Maiquez
176470dad9 Image color and alpha can now be user-settings
Removed old Color structures not useful anymore

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-01 02:08:05 +01:00
Alexis Maiquez
cf37fe388c Added support for usersettings in the bloom
Added casting for integer to double in json loading
Added support for dumping all available properties

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-01-31 21:37:38 +01:00
Alexis Maiquez
691ac42e85 Added small helper to get user-customizable settings with defaults
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-11-04 00:04:05 +01:00
Alexis Maiquez
8955ba791c Bumped up shader version to 150 (work on shaders not compiling for #115 and #117)
Improved jsonFindDefault to not crash when the value types do not match (should partially fix #116)

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-07-15 12:20:12 +02:00
Alexis Maiquez
09effd0303 CFBO frame dummy values added
Added combo properties support
Bumped up GLSL version to 130 and added some extra definitions

This work goes on to #115, although the background won't start up yet because of shader compilation issues

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-07-14 22:12:46 +02:00
Alexis Maiquez
3f4996234e ~ changed some json data to have a default value if it's null or not-existant
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-08 21:17:02 +02:00
Alexis Maiquez
65bfbe1493 + added some default values for TextureMipmap as they were not being set automatically by the compiler sometimes (and thus breaking the texture load)
+ added helper to parse vector4 data from json
- removed some old, commented out code
+ added support for getting textures from the shader's code too (fixes masks on some backgrounds)
+ added support for shader varibles with default values from shader's source code

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-04 15:02:11 +02:00
Alexis Maiquez
dd76439901 ~ fixed a_TexCoord variable not having the correct values
- removed irrlicht functions and types from the active codebase so it's no longer required at compile time (CContext still there as the code might be still be useful)

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-08-31 02:29:28 +02:00
Alexis Maiquez
291b7e364a - removed/commented out most irrlicht-specific code
~ written close to equivalent versions in OpenGL code using GLM and GLFW
~ written replacements for texture and package loading to not use irrlicht anymore
~ updated shader compiler as we now don't need to replace attributes anymore
+ added support for texture flags in the texture header (as they're needed for opengl to get proper information)

TODO: REWRITE VIDEO PLAYER SUPPORT AS THIS UPDATE EFFECTIVELY BREAKS IT

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-08-31 01:14:08 +02:00
Alexis Maiquez
27b50ffac9 ~ some settings for the camera are optional, so treat them that way (camera shake and parallax)
+ added helper functions to get optional values in an easy way

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2020-08-25 15:09:29 +02:00
Alexis Maiquez
cf70484188 ~ forward port changes on the pull request #22 by @ambidot
Added positioning code based on material origin, size, and scale.
  Fixed mirrored vertices and mirrored BGRA pixels.
  Added DXT3 support.
  Fixed DXT decompression segfault due to sizeof (long).
  Fixed RGBA packing order.
  Enabled PKGV0008 support.
  Fixed detection of json "scene" string with uppercase characters.
  Fixed positioning of miscellaneous foreground objects.
  (commits 72831e1b2f, 9017a5732e, 853d128830, af846053c8 and c45b58bc96)

~ updated CRotationRandom to support numeric and vectorial rotations

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2020-07-29 13:21:54 +02:00
Alexis Maiquez
838c9499e7 ~ changed missed nlohmann::json::iter_imp<nlohman::json> to nlohmann::json::iterator from PR #12
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2020-03-25 14:36:07 +01:00
IceCryptonym
b37c519209 Nitpicks 2020-03-25 10:20:34 +10:00
IceCryptonym
7baa77ef7e Missed a few replacements of content.find 2020-03-24 19:04:44 +10:00
IceCryptonym
5122206d83 Renames jsonFindValueRequired to jsonFindRequired 2020-03-24 15:38:56 +10:00
IceCryptonym
e30f62d7a1 Clean up json.find(...) calls 2020-03-24 15:32:27 +10:00
Alexis Maiquez
3587fdec1e ~ changed all iterators to auto
~ changed most pointers to const references to prevent modification, specially from the background parser

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-10 11:02:45 +02:00
Alexis Maiquez
1c50095ead ~ Changed FileSystem/utils.h to FileSystem/FileSystem.h following the same criteria used in Core namespace
~ Updated #include directives to include full paths to files
~ Re-organized folder structure for the project

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-04 09:18:33 +02:00