Commit Graph

21 Commits

Author SHA1 Message Date
Alexis Maiquez
03c4660f5c ~ brought back path fixing functionality so all paths given in the command line now end with a /
+ added support for texture format definition (TEX0FORMAT) although it might need some more investigation (specially for multi-pass shaders)
+ added implicit conversion from vec3 to vec2 in shaders

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-05 21:53:37 +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
b152913d90 - removed useless variable types that are not being used anymore
~ updated some strings to ensure the type-checking matches
+ added support for integer <-> float casting on constants
+ added support for vec2 variables

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-04 15:44:39 +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
2ffb5f1b24 + added an extra render pass to render the scene upside down (so it looks fine)
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-03 03:24:55 +02:00
Alexis Maiquez
9d7d344b80 - removed commented code from main.cpp that is not useful anymore
~ changed how g_Time is calculated so any shader that uses it should behave properly
~ changed how the uniforms are set to a reinterpret_cast instead of static_cast to perform a direct pointer conversion (safe as we know the types were actually those types)

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-02 22:30:38 +02:00
Alexis Maiquez
59e6800f81 + added depthtesting and blending support for shader passes
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-02 09:05:12 +02:00
Alexis Maiquez
09d53e8dd7 + added proper value for a_TexCoord when the rendering is not hapening from the main texture
TODO: THIS IS ALL EXPERIMENTAL CODE, THESE VALUES WILL BE SETUP ON STARTUP AND NOT ON RUNTIME

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-01 20:10:21 +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
d9c12d0b58 - removed .idea folder as that shouldn't have been uploaded in the first place
~ changed g_Time to float instead of double

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-01 15:30:00 +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
861f2261ef ~ changed the texture resolution constant on shaders, although it is 100% incorrect, seems to get some more wallpapers working
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-08-08 09:41:25 +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
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
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