mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-07-13 21:02:34 +08:00
Fixed bloom effect not being properly applied
Added support for userparameter on the clearcolor of the scene Scenes should draw into the full framebuffer Signed-off-by: Alexis Maiquez <almamu@almamu.com>
This commit is contained in:
parent
56ebb78287
commit
fa67fa5b00
4
main.cpp
4
main.cpp
@ -216,11 +216,11 @@ CVirtualContainer* buildVirtualContainer ()
|
||||
"\t\t},"
|
||||
"\t\t{"
|
||||
"\t\t\t\"material\": \"materials/util/combine.json\","
|
||||
"\t\t\t\"target\": \"_rt_imageLayerComposite_-1_b\","
|
||||
"\t\t\t\"target\": \"_rt_FullFrameBuffer\","
|
||||
"\t\t\t\"bind\":"
|
||||
"\t\t\t["
|
||||
"\t\t\t\t{"
|
||||
"\t\t\t\t\t\"name\": \"_rt_FullFrameBuffer\","
|
||||
"\t\t\t\t\t\"name\": \"_rt_imageLayerComposite_-1_a\","
|
||||
"\t\t\t\t\t\"index\": 0"
|
||||
"\t\t\t\t},"
|
||||
"\t\t\t\t{"
|
||||
|
@ -74,7 +74,7 @@ CScene* CScene::fromFile (const std::string& filename, CContainer* container)
|
||||
auto camerashakeamplitude = jsonFindDefault <double> (*general_it, "camerashakeamplitude", 0.0f);
|
||||
auto camerashakeroughness = jsonFindDefault <double> (*general_it, "camerashakeroughness", 0.0f);
|
||||
auto camerashakespeed = jsonFindDefault <double> (*general_it, "camerashakespeed", 0.0f);
|
||||
auto clearcolor_it = jsonFindRequired (*general_it, "clearcolor", "General section must have clear color");
|
||||
auto clearcolor = jsonFindUserConfig <std::string> (*general_it, "clearcolor", "1 1 1");
|
||||
auto orthogonalprojection_it = jsonFindRequired (*general_it, "orthogonalprojection", "General section must have orthogonal projection info");
|
||||
auto skylightcolor = jsonFindDefault <std::string> (*general_it, "skylightcolor", "0 0 0");
|
||||
|
||||
@ -95,7 +95,7 @@ CScene* CScene::fromFile (const std::string& filename, CContainer* container)
|
||||
camerashakeamplitude,
|
||||
camerashakeroughness,
|
||||
camerashakespeed,
|
||||
WallpaperEngine::Core::aToColorf(*clearcolor_it),
|
||||
WallpaperEngine::Core::aToColorf(clearcolor),
|
||||
Scenes::CProjection::fromJSON (*orthogonalprojection_it),
|
||||
WallpaperEngine::Core::aToColorf(skylightcolor)
|
||||
);
|
||||
|
@ -247,8 +247,8 @@ void CScene::renderFrame (glm::ivec4 viewport)
|
||||
|
||||
// use the scene's framebuffer by default
|
||||
glBindFramebuffer (GL_FRAMEBUFFER, this->getWallpaperFramebuffer());
|
||||
// ensure we render over the whole screen
|
||||
glViewport (0, 0, projection->getWidth (), projection->getHeight ());
|
||||
// ensure we render over the whole framebuffer
|
||||
glViewport (0, 0, this->m_sceneFBO->getRealWidth (), this->m_sceneFBO->getRealHeight ());
|
||||
|
||||
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user