Skip to content

Commit

Permalink
update README.md and change window resolution to 960 x 540
Browse files Browse the repository at this point in the history
  • Loading branch information
DXT00 committed Jun 2, 2024
1 parent dbbb4de commit e87e650
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 18 deletions.
4 changes: 2 additions & 2 deletions BlackPearl/src/BlackPearl/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ namespace BlackPearl {
static const unsigned int MaxComponents = 32;
typedef std::bitset<MaxComponents> ComponentMask;

static const unsigned int WindowWidth = 1920;// 960;1024x768
static const unsigned int WindowHeight = 1080;// 540;
static const unsigned int WindowWidth = 960;// 1920 1024x768
static const unsigned int WindowHeight = 540;// 540;1080

//多重采样
static const unsigned int MSAA_SAMPLES = 4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,23 +104,15 @@ namespace BlackPearl {

}






}
void IBLProbesRenderer::RenderDiffuseProbeMap(int idx,const LightSources* lightSources, const std::vector<Object*> objects, const std::vector<Object*> dynamicObjs, float timeInSecond, const std::vector<Object*> diffuseProbes, Object* skyBox)
{
GE_ASSERT(m_IsInitial, "please initial IBLProbesRenderer first! IBLProbesRenderer::init()");

//for (auto it = diffuseProbes.begin(); it != diffuseProbes.end(); it++) {

// Object* probe = *it;
UpdateDiffuseProbesMap(lightSources, objects, dynamicObjs, timeInSecond, skyBox, diffuseProbes[idx]);
UpdateDiffuseProbesMap(lightSources, objects, dynamicObjs, timeInSecond, skyBox, diffuseProbes[idx]);

//}
}

void IBLProbesRenderer::RenderDiffuseProbeMap(const LightSources* lightSources, const std::vector<Object*> objects, const std::vector<Object*> dynamicObjs, float timeInSecond, const std::vector<Object*> diffuseProbes, Object* skyBox)
{
GE_ASSERT(m_IsInitial, "please initial IBLProbesRenderer first! IBLProbesRenderer::init()");
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@
BlackPearl Engine is a dynamic GI rendering engine to simulate different dynamic GI algorithm,such as light probe based GI,voxel cone tracing GI,image based lighting, sparse voxel octree cone tracing.You can select the algorithm you want to simulate in SandBox.

## Get start
1) select render API, modify the RenderAPI Settings in GenerateProject.bat:
```
call vendor\bin\premake\premake5.exe vs2022 --RenderAPI=opengl
PAUSE
```
You can choose RenderAPI from the following three options:
{ "opengl", "OpenGL" },
{ "direct3d", "Direct3D (Windows only)" },
{ "vulkan", "Vulkan" }

1) run GenerateProject.bat to set up visual studio project,it is only for Windows now.
2) select the GI algorithom in SandBox.cpp(openGL supported algorithm) or SandBoxDX.cpp (directX supported GI algorithm.such as DXR)
2) run GenerateProject.bat to set up visual studio project,it is only for Windows now.
3) select the GI algorithom in SandBox.cpp(openGL supported algorithm) or SandBoxDX.cpp (directX supported GI algorithm.such as DXR) or SandBoxVK.cpp


SandBox.cpp
Expand Down
4 changes: 1 addition & 3 deletions SandBox/src/Layers/IBLProbesRenderingLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ class IBLProbesRenderingLayer :public BlackPearl::Layer {
m_MapManager = DBG_NEW BlackPearl::MapManager(BlackPearl::Configuration::MapSize, BlackPearl::Configuration::AreaSize);
m_MapRenderer = DBG_NEW BlackPearl::MapRenderer(m_MapManager);

//Shader
//m_BackGroundShader.reset(DBG_NEW BlackPearl::Shader("assets/shaders/ibl/background.glsl"));
//m_DebugQuadShader.reset(DBG_NEW BlackPearl::Shader("assets/shaders/QuadDebug.glsl"));


/* probe's CubeObj and quad for BrdfLUTMap */
m_BrdfLUTQuadObj = CreateQuad("assets/shaders/ibl/brdf.glsl", "");
Expand Down
2 changes: 1 addition & 1 deletion SandBox/src/SandBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class SandBox :public BlackPearl::Application {

BlackPearl::Application* BlackPearl::CreateApplication(HINSTANCE hInstance, int nShowCmd) {

return DBG_NEW SandBox(hInstance, nShowCmd, BlackPearl::DynamicRHI::Type::OpenGL, "SSR");
return DBG_NEW SandBox(hInstance, nShowCmd, BlackPearl::DynamicRHI::Type::OpenGL, "IBLProbesRendering");
//return DBG_NEW SandBox(hInstance, nShowCmd, BlackPearl::DynamicRHI::Type::OpenGL, "PbrRendering");
}

0 comments on commit e87e650

Please sign in to comment.