mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-09-14 13:56:48 +08:00
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:
parent
6f570be911
commit
62af627ffa
@ -6,7 +6,8 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
|
|||||||
set(OpenGL_GL_PREFERENCE "LEGACY")
|
set(OpenGL_GL_PREFERENCE "LEGACY")
|
||||||
|
|
||||||
# if you're developing you might find this debug option useful for shader output, although RenderDoc is encouraged
|
# 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(X11 REQUIRED)
|
||||||
find_package(Xrandr REQUIRED)
|
find_package(Xrandr REQUIRED)
|
||||||
|
@ -37,11 +37,19 @@ namespace WallpaperEngine::Assets
|
|||||||
enum TextureFormat : uint32_t
|
enum TextureFormat : uint32_t
|
||||||
{
|
{
|
||||||
ARGB8888 = 0,
|
ARGB8888 = 0,
|
||||||
|
RGB888 = 1,
|
||||||
|
RGB565 = 2,
|
||||||
DXT5 = 4,
|
DXT5 = 4,
|
||||||
DXT3 = 6,
|
DXT3 = 6,
|
||||||
DXT1 = 7,
|
DXT1 = 7,
|
||||||
RG88 = 8,
|
RG88 = 8,
|
||||||
R8 = 9,
|
R8 = 9,
|
||||||
|
RG1616f = 10,
|
||||||
|
R16f = 11,
|
||||||
|
BC7 = 12,
|
||||||
|
RGBa1010102 = 13,
|
||||||
|
RGBA16161616f = 14,
|
||||||
|
RGB161616f = 15,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -346,7 +346,7 @@ void CImage::setupPasses ()
|
|||||||
// setup target texture
|
// setup target texture
|
||||||
std::string target = pass->getMaterial ()->getMaterial ()->getTarget ();
|
std::string target = pass->getMaterial ()->getMaterial ()->getTarget ();
|
||||||
drawTo = pass->getMaterial ()->getEffect ()->findFBO (target);
|
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
|
// not a local fbo, try to find a scene fbo with the same name
|
||||||
if (drawTo == nullptr)
|
if (drawTo == nullptr)
|
||||||
|
@ -491,7 +491,7 @@ namespace WallpaperEngine::Render::Shaders
|
|||||||
if (this->m_recursive == false)
|
if (this->m_recursive == false)
|
||||||
{
|
{
|
||||||
// add the opengl compatibility at the top
|
// add the opengl compatibility at the top
|
||||||
finalCode = "#version 130\n"
|
finalCode = "#version 150\n"
|
||||||
"// ======================================================\n"
|
"// ======================================================\n"
|
||||||
"// Processed shader " + this->m_file + "\n"
|
"// Processed shader " + this->m_file + "\n"
|
||||||
"// ======================================================\n"
|
"// ======================================================\n"
|
||||||
@ -500,7 +500,7 @@ namespace WallpaperEngine::Render::Shaders
|
|||||||
"#define lowp\n"
|
"#define lowp\n"
|
||||||
"#define mul(x, y) ((y) * (x))\n"
|
"#define mul(x, y) ((y) * (x))\n"
|
||||||
"#define max(x, y) max (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 lerp mix\n"
|
||||||
"#define frac fract\n"
|
"#define frac fract\n"
|
||||||
"#define CAST2(x) (vec2(x))\n"
|
"#define CAST2(x) (vec2(x))\n"
|
||||||
@ -558,7 +558,7 @@ namespace WallpaperEngine::Render::Shaders
|
|||||||
|
|
||||||
finalCode += this->m_compiledContent;
|
finalCode += this->m_compiledContent;
|
||||||
|
|
||||||
if (DEBUG && this->m_recursive == false)
|
if (DEBUG && this->m_recursive == false && !ERRORONLY)
|
||||||
{
|
{
|
||||||
if (this->m_type == Type_Vertex)
|
if (this->m_type == Type_Vertex)
|
||||||
std::cout << "======================== COMPILED VERTEX SHADER " << this->m_file.c_str () << " ========================" << std::endl;
|
std::cout << "======================== COMPILED VERTEX SHADER " << this->m_file.c_str () << " ========================" << std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user