Commit Graph

462 Commits

Author SHA1 Message Date
Alexis Maiquez
b4a6dc9bcd ~ fragment shaders can set new combos on rare occasions, so updated shader compiler to reflect this possibility
~ also updated shader passes to ensure it takes this into account

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-08-08 07:41:12 +02:00
Alexis Maiquez
65a26c2b16 - removed some special handling for white masks that was a dirty fix, the new code should support it out of the box properly
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-08-08 02:10:31 +02:00
Alexis Maiquez
4309ca722d + properly set g_Time for shaders
+ properly set g_TextureXResolution for shaders
+ properly set g_TextureX for shaders
+ properly set g_TextureXRotation for shaders

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-08-08 02:02:17 +02:00
Alexis Maiquez
2673179909 + added a really dirty fix for the upside down textures that had applied some effects to them
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-08-08 01:14:52 +02:00
Alexis Maiquez
c93c72edc0 + added orthogonal flag to the camera
~ removed reduntant code from CImage and made use of the new versions of the same code on CEffect, CMaterial and CPass to simplify the rendering code and make it easier to read
  TODO: FIX MATRIX THAT VERTICALLY FLIPS THE IMAGES!
~ properly linked output from CMaterial, CEffect and CPass so a full render pass outputs something to the screen

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-07-29 16:05:15 +02:00
Alexis Maiquez
d212bde9aa + added the assets folder to the gitignore
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-06-16 21:31:24 +02:00
Alexis Maiquez
89f956e796 ~ fix image positioning when the camera center was not 0, 0, 0
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-06-16 18:38:37 +02:00
Alexis Maiquez
4a1f91d548 Merge branch 'data-separation' of github.com:Almamu/linux-wallpaperengine into data-separation 2021-06-16 18:10:36 +02:00
Alexis Maiquez
10191202df + added light element type to the detection list, not supported yet
+ added PKGV0004, PKGV0005, PKGV0006 to the list

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-06-16 18:10:05 +02:00
Alexis Maiquez
e89e80c2b8 ~ Fixed a mistake in the variable parsing for the shader pre-compiler, arrays are not always expected
Signed-off-by: Alexis Maiquez Murcia <almamu@almamu.com>
2020-10-29 12:00:51 +01:00
Alexis Maiquez
a0ed644491 ~ added search for text objects in the backgrounds to prevent crashes for now
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2020-08-25 15:19:45 +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
d5ee71540d ~ ignore particle loading errors as the required data is not yet 100% clear
+ added support for PKGV0009 packages (should fix #24 for @UltraBlackLinux)

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2020-08-24 17:51:24 +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
3730ac438f ~ fix segmentation fault reported on #22
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2020-07-28 10:55:56 +02:00
Alexis Maiquez Murcia
79e9ead2ee Merge branch 'data-separation' of github.com:Almamu/linux-wallpaperengine into data-separation
# Conflicts:
#	CMakeLists.txt
#	src/WallpaperEngine/Core/Objects/Particles/Initializers/CRotationRandom.cpp
#	src/WallpaperEngine/Core/Objects/Particles/Initializers/CRotationRandom.h
#	src/WallpaperEngine/Core/Projects/CProperty.cpp
#	src/WallpaperEngine/Render/CScene.cpp
#	src/WallpaperEngine/Render/Objects/CSound.cpp
#	src/WallpaperEngine/Render/Objects/CSound.h

Signed-off-by: Alexis Maiquez Murcia <almamu@almamu.com>
2020-07-06 20:26:04 +02:00
Alexis Maiquez Murcia
7d7c51a3bc ~ moved camera initialization before the actual items initialization
+ added PKGV0007 to the list of supported packages (experimental)
+ added support for parsing properties of type bolean
+ added parsing of a missing particle initializer (turbulentvelocityrandom)
+ added back sound playinh which was left out when rewritting

Signed-off-by: Alexis Maiquez Murcia <almamu@almamu.com>
2020-07-06 20:05:15 +02:00
IceCryptonym
5d5ce361fe
Initial video support without audio (#14)
* Adds FFmpeg to CMake
* Refactors to allow support for other wallpaper types
* Updates README.md for compilation requirements
* Initial video support without audio
* Properly support different wallpapers
* Fixes videos not rendering
* Nitpicks
* Moves code related to rendering from Core::CVideo to Render::CVideo
2020-04-27 18:50:17 +02:00
Alexis Maiquez
98e245b4cb + added error reporting for SDL initialization
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2020-03-31 23:32:46 +02:00
Alexis Maiquez
7f227291d2 + added missing license for the DXT1 and DXT5 decompressors
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2020-03-26 11:00:01 +01: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
Alexis Maiquez
b4320242cc
Merge pull request #12 from IceCryptonym/data-separation
Cleans up nlohmann::json.find(...) calls
2020-03-25 08:46:20 +01:00
IceCryptonym
b37c519209 Nitpicks 2020-03-25 10:20:34 +10:00
IceCryptonym
8172c970b1 Forgot to change key parameter to correct value 2020-03-24 20:41:32 +10:00
IceCryptonym
52fc0ffbac Forgot to change key parameter to correct value 2020-03-24 20:31:31 +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
1a6bfac3ee Merge branch 'data-separation' of github.com:Almamu/linux-wallpaperengine into data-separation 2020-03-24 01:00:58 +01:00
Alexis Maiquez
274bb08e4f ~ fix images being rendered fliped horizontally
+ added support for arrays in shaders

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2020-03-24 01:00:33 +01:00
Alexis Maiquez
59fa9544e6
Merge pull request #11 from IceCryptonym/data-separation
Removes duplicate code in CContext.cpp
2020-03-17 10:56:57 +01:00
IceCryptonym
96839dd61b Use backBuffer parameter in drawScene 2020-03-17 10:34:55 +10:00
IceCryptonym
d57ad95ab4 Fix code style 2020-03-17 09:19:28 +10:00
IceCryptonym
67be40032a Removed duplicate code 2020-03-17 09:15:19 +10:00
Alexis Maiquez
8d2f2adcfa ~ added proper texture input/output
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-11 15:52:51 +02:00
Alexis Maiquez
cbe79b535b ~ changed wrong class name crom CPassess to CPass
+ added parsing of bind section for shader passes
~ various new classes to properly handle texture targets, shader passes and materials

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-11 15:32:57 +02:00
Alexis Maiquez
5e94fc7bab + added parsing of dependencies for objects
+ added fbos parsing from effect files
~ cleaned up effect parsing code
~ support for texture target parsing in materials for texture render targets
~ changed way of modifying textures from passes to a more abstracted way
~ moved shader constants to it's own namespace

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-11 09:15:50 +02:00
Alexis Maiquez
e32bc4d6f1 ~ effect parsing now takes into account combos and assigns the shader constants to the proper shader pass
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-10 15:28:59 +02:00
Alexis Maiquez
318a99d5ca + added vector3 support for shader constants (looks like strings were vector3 after all)
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-10 15:01:59 +02:00
Alexis Maiquez
4358e7c173 - removed shader string constants, shaders do not have any, for future reference, these might be vectors or colors
+ shader constants now should be correctly applied as values for variables whenever possible

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-10 14:54:49 +02:00
Alexis Maiquez
dc36adb200 + added mouse input handling and mouse position variable to shaders
+ added vector2 pointer class for shader parameters

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-10 13:55:12 +02:00
Alexis Maiquez
d7cf8af7ca + created global variable storage for shaders
+ added g_Time to global variable storage
- removed global g_Time from main
~ changed "shader parameters" to "shader variables" as it's a more apt naming

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-10 13:27:18 +02:00
Alexis Maiquez
d03edb7c1e ~ cleaned up main function and moved initialization functions to a more proper place
~ check for SDL initialization before playing audio to prevent error messages when there is not really any error
~ changed a missed iterator to auto on CSound

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-10 12:55:45 +02:00
Alexis Maiquez
ce67c0bf64 ~ moved file resolution to the Irrlicht Context class
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-10 11:32:15 +02: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
3371e10b01 ~ fixed segmentation fault when creating a scene
+ added check for texture rendering on startup
~ fixed possibly wrong texture size for passes
~ changed camera position

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-09 16:06:28 +02:00
Alexis Maiquez
f7be32eed3 ~ moved OnRegisterSceneNode to CObject as this function should barely change
+ support for sounds added

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-09 10:13:06 +02:00
Alexis Maiquez
e285b313e0 ~ use clearcolor from scene instead of using black
~ camera should use it's own getters, not access the m_camera object directly

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-09 09:46:29 +02:00
Alexis Maiquez
d13ad3fdca ~ moved passes counter to the correct place
~ generated unique name for pass textures

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-09 09:20:27 +02:00
Alexis Maiquez
7ab533aaab + Support for multi-passes materials added
Take in mind that this feature is still in development, so the result most likely will be very different from the actual wallpaper engine
  The final approach might be different from what's currently in use, but It's just a nice proof of concept approach

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-09 02:30:29 +02:00