diff --git a/CMakeLists.txt b/CMakeLists.txt index 16215e9..25a1a89 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,8 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules") set(OpenGL_GL_PREFERENCE "LEGACY") # if you're developing you might find this debug option useful for shader output, although RenderDoc is encouraged -add_compile_definitions(DEBUG=0) +add_compile_definitions(DEBUG=1) +add_compile_definitions(ERRORONLY=0) find_package(X11 REQUIRED) find_package(Xrandr REQUIRED) diff --git a/src/WallpaperEngine/Assets/ITexture.h b/src/WallpaperEngine/Assets/ITexture.h index 06e6d7e..caa9b20 100644 --- a/src/WallpaperEngine/Assets/ITexture.h +++ b/src/WallpaperEngine/Assets/ITexture.h @@ -37,11 +37,19 @@ namespace WallpaperEngine::Assets enum TextureFormat : uint32_t { ARGB8888 = 0, + RGB888 = 1, + RGB565 = 2, DXT5 = 4, DXT3 = 6, DXT1 = 7, RG88 = 8, R8 = 9, + RG1616f = 10, + R16f = 11, + BC7 = 12, + RGBa1010102 = 13, + RGBA16161616f = 14, + RGB161616f = 15, }; /** diff --git a/src/WallpaperEngine/Render/Objects/CImage.cpp b/src/WallpaperEngine/Render/Objects/CImage.cpp index d651312..27ef1a5 100644 --- a/src/WallpaperEngine/Render/Objects/CImage.cpp +++ b/src/WallpaperEngine/Render/Objects/CImage.cpp @@ -346,7 +346,7 @@ void CImage::setupPasses () // setup target texture std::string target = pass->getMaterial ()->getMaterial ()->getTarget (); drawTo = pass->getMaterial ()->getEffect ()->findFBO (target); - spacePosition = this->getPassSpacePosition (); + // spacePosition = this->getPassSpacePosition (); // not a local fbo, try to find a scene fbo with the same name if (drawTo == nullptr) diff --git a/src/WallpaperEngine/Render/Shaders/Compiler.cpp b/src/WallpaperEngine/Render/Shaders/Compiler.cpp index 9397fbd..e282fae 100644 --- a/src/WallpaperEngine/Render/Shaders/Compiler.cpp +++ b/src/WallpaperEngine/Render/Shaders/Compiler.cpp @@ -491,7 +491,7 @@ namespace WallpaperEngine::Render::Shaders if (this->m_recursive == false) { // add the opengl compatibility at the top - finalCode = "#version 130\n" + finalCode = "#version 150\n" "// ======================================================\n" "// Processed shader " + this->m_file + "\n" "// ======================================================\n" @@ -500,7 +500,7 @@ namespace WallpaperEngine::Render::Shaders "#define lowp\n" "#define mul(x, y) ((y) * (x))\n" "#define max(x, y) max (y, x)\n" - "#define fmod(x, y) (x-y*trunc(x/y))\n" + "#define fmod(x, y) ((x)-(y)*trunc((x)/(y)))\n" "#define lerp mix\n" "#define frac fract\n" "#define CAST2(x) (vec2(x))\n" @@ -558,7 +558,7 @@ namespace WallpaperEngine::Render::Shaders finalCode += this->m_compiledContent; - if (DEBUG && this->m_recursive == false) + if (DEBUG && this->m_recursive == false && !ERRORONLY) { if (this->m_type == Type_Vertex) std::cout << "======================== COMPILED VERTEX SHADER " << this->m_file.c_str () << " ========================" << std::endl;