Commit Graph

25 Commits

Author SHA1 Message Date
Alexis Maiquez
96b931d931 Added g_ModelMatrix, g_NormalModelMatrix, g_ViewProjectionMatrix, g_LightAmbientColor and g_LightSkylightColor to shaders
Added support for specifying array variables for shaders

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-04-20 21:54:45 +02:00
Alexis Maiquez
a89d8ebb22 Added basic support for audio processing so backgrounds can react to sound playing in the system
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-03-26 18:18:21 +02:00
Alexis Maiquez
cc7ec0561d Separated X11 fullscreen code detection from the output driver as they don't have to work at the same time
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-03-23 23:38:23 +01:00
Alexis Maiquez
55760aee4d More code cleanup:
- Separated program args parsing and validation from initialization code
 - Application's main body in it's own class

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-07 04:17:51 +01:00
Alexis Maiquez
30bb8d6d72 Small cleanup of pass initialization code
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-05 06:36:07 +01:00
Alexis Maiquez
ed1efdcd66 Added parsing for text properties
Simplified how passes rendering works and separated it into a two stages process
  Setup (prepares shaders, uniforms, attributes, etc)
  Render (only performs the actual rendering)

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-11-04 10:16:15 +01:00
Alexis Maiquez
c13d743022 Container access should happen through CContext
Textures now have a cache system that prevents loading them more than once

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-11-03 14:27:05 +01:00
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
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
13ef4a96c2 ~ changed orthographic camera to use the center as 0, might get reverted,
~ shader passes now won't try to detect projection, texcoord or position, as this'll be specified as parameters
~ removed useless variables being stored
~ model view projection matrix is now stored by image, not by pass
~ proper calculation of centered images

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-10-01 04:06:27 +02:00
Alexis Maiquez
f86eba347c ~ changed priority of assets loading, so background's assets should be loaded before looking into the assets folder
~ hopefully fixed effects that use shader targets so they now display properly

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-29 01:21:35 +02:00
Alexis Maiquez
f5e943b0fc + added ansiotropic filtering
~ material's binds are now a map by index so it's easier to use
- removed depth buffer for FBOs as they're not really useful (at least for now)
~ separated image setup in two stages so FBO creation happens before actually requiring them
- removed ping-pong FBOs where they didn't make sense
~ image's should now render to scene buffer directly whenever possible
~ better support for FBO scaling
~ rendering should now take into account targets and binds in a much better way

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-28 21:41:24 +02: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
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
06c519ce79 - removed useless debugging output
~ changed attribs to be registered at a list too to make it easier to use

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-01 19:55:03 +02:00
Alexis Maiquez
eb29078cfe - removed duplicated list of variables and unified under the new way of registering uniforms, simplifying required code
- removed commented out code on CPass as there's already almost equivalent code working

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-01 01:48:21 +02:00
Alexis Maiquez
7613bf254a ~ updated readme to reflect current status
+ added texture resolution to CTexture so it can be properly used in the CPass
+ framebuffer textures now have filtering specified (prevents black screen), still need to adjust information about the texture
+ added proper uniform variable registration to ease the usage

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-01 01:27:01 +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
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
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
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