~ 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>
+ 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>
~ 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>
+ 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>
+ set proper glViewport instead of hardcoded 1920 by 1080 (this might require some changing and instead do a glViewport of the screen/window size and then scaling the backbuffers)
~ set proper texture size for pingpong buffers (to work with the viewport fixes)
- removed FREE_IMAGE_FORMAT as it's already included in the FreeImage library
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
~ 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>
+ 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>
- 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>
~ 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>
+ 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>
~ 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>