Added some missing texture formats to the definition

Added some extra settings for debugging

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
This commit is contained in:
Alexis Maiquez 2023-01-29 18:19:00 +01:00
parent 6f570be911
commit 62af627ffa
4 changed files with 14 additions and 5 deletions

View File

@ -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)

View File

@ -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,
};
/**

View File

@ -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)

View File

@ -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;