Commit Graph

42 Commits

Author SHA1 Message Date
Alexis Maiquez
5521e90155 Ignore composelayers for now
Added support for color blend mode
Main pass' blendmode should be normal
Last pass' blendmode should be the first's
Fixed order of glClear's so _rt_FullFrameBuffer is the right color at the right time
Simplified effect and pass creation code a bit more
Non-visible images should render the full chain into the pingpong framebuffers instead of to screen
Fixed an integer division not producing float numbers

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-11-03 13:14:52 +01:00
Alexis Maiquez
7e6cb9a458 Simplified image rendering code further
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-11-01 04:00:34 +01:00
Alexis Maiquez
cb6f05ff27 Simplified image rendering code a bit so it's easier to follow
Improved detection of macros for shaders

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-10-31 12:09:14 +01:00
Alexis Maiquez
a13d2f265b Fixed regression for spritesheets not working properly
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-10-28 18:43:12 +02:00
Alexis Maiquez
7b7d699371 Implemented proper dependency detection for images
Simplified texture decision graph and preload it so render is quicker
Improved material detecion on shaders

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-10-28 18:21:29 +02:00
Alexis Maiquez
9ff33ef61f Support for specifying FBOs texture flags
Further improvements on detection of combo values for shaders
Support for detecting visibility settings on effects

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-10-28 15:45:35 +02:00
Alexis Maiquez
4e3254e843 Improved detection of "previous" textures (fixes 2370927443)
Added support for PKGV0018
Try to prevent crashing when shaders do not compile and go with whatever can be displayed

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-10-26 09:09:13 +02: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
e5ef7bd53e ~ updated shader compiler to look for the first function, not just main
should fix #106

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-06-10 14:04:22 +02:00
Alexis Maiquez
e51734e4f9 ~ better fix for #103
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-06-09 12:33:38 +02:00
Alexis Maiquez
cf2e31a606 ~ quick fix for shader compilation with nested includes, should fix #103
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-06-09 12:12:50 +02:00
Alexis Maiquez Murcia
7acac874fa ~ Includes should be after all variable declarations and before the main function, fixes #97 and #100
Signed-off-by: Alexis Maiquez Murcia <almamu@almamu.com>
2022-06-01 20:12:23 +02:00
Alexis Maiquez Murcia
fca645b25a ~ Fixed RG88 and R8 textures not loading properly
~ Fixed combo setting based on the textures supplied to the image
~ Fixed vec4 shader constants not using the default value
  Should fix #87

Signed-off-by: Alexis Maiquez Murcia <almamu@almamu.com>
2022-04-07 23:34:03 +02:00
Alexis Maiquez Murcia
8450413105 The "max" function has the parameters in the reverse order, fixes #86 not booting up
Signed-off-by: Alexis Maiquez Murcia <almamu@almamu.com>
2022-04-07 20:45:19 +02:00
Alexis Maiquez
d0572b257f ~ Combos can have no default value
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-12-02 22:00:43 +01:00
Alexis Maiquez
342522cd1d + Added handling for floating point precision qualifiers on type detection
+ Fixed textures not being detected properly on images that do not have any source

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-12-02 21:33:50 +01:00
Alexis Maiquez
9d2e9b43ee ~ Fixed an infinite loop in the shader compiler
+ Added more valid variable types to the shader compiler so compilation doesn't fail

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-11-29 13:36:15 +01:00
Alexis Maiquez
5828b2ee80 + added some extra documentation on rendering based on observations and trial and error
~ deprecated --dir --pkg options, the software will automatically detect the background we're loading
+ first draft of FBO support, there's still some extra work to do
~ texture header is now hidden behind getters so the textures can be any kind of source
~ proper setting of resolution and translation variables for textures
~ simplified call flow for any pass rendering, removing render functions on effect and material
~ framebuffer setup has to happen before object setup in the scene

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-27 01:39:23 +02:00
Alexis Maiquez
3736c0c1b9 - removed some irr:: types left on the code that I missed
~ quick and dirty hack to make combos propagate between shaders (this needs to be improved, left TODOs for that)

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-08 20:30:03 +02:00
Alexis Maiquez
2432ec9a36 ~ some cleanup of todos and dead code
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-05 22:02:58 +02:00
Alexis Maiquez
113d84173e ~ changed readTexture for containers to produce a CTexture file ready to be used (simplifies loading textures)
~ fixed a write to null error on CDirectory that wasn't taking into account that length can be null

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-05 14:29:11 +02:00
Alexis Maiquez Murcia
30b4eb4cd4 ~ fix type extraction on shaders not working properly
+ added uint4 and mat4x3 types

Signed-off-by: Alexis Maiquez Murcia <almamu@almamu.com>
2021-09-04 21:49:48 +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
537acb97bd ~ shader precompilation should be done in order to ensure that the vertex shader has information discovered by the fragment shader (like new combos) should fix some effects on backgrounds
+ added partial support for shader constant values from the scene.json

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-08-08 08:41:03 +02:00
Alexis Maiquez
8d0eb6d63c ~ combo value detection should now update combo list on shaders too instead of writting them directly
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-08-08 07:46:06 +02:00
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
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
IceCryptonym
b37c519209 Nitpicks 2020-03-25 10:20:34 +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
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
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
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
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
Alexis Maiquez
32a6a7af65 + Added parsing of shader constants for effects
~ Improved Shader Compiler parameter list to a better approach
+ Added support for one-pass effects with shaders (only first shader/pass will be applied)

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-08 21:09:19 +02:00
Alexis Maiquez
b8b3c2899d ~ Removed static variables in namespace WallpaperEngine::Irrlicht and moved to a context approach
This includes changes to old code to be compatible, the externs won't be used once the renderer is rewritten and the old code removed

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-05 17:24:16 +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