Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix OpenGl backend #496

Closed
wants to merge 97 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
dfc0ca0
integrate fbx workflow
T-rvw Mar 4, 2024
f9ed320
change emitcomponent build format
OVOAOVO Mar 5, 2024
159a845
Add Range Of Particle Life Time
OVOAOVO Mar 5, 2024
717d715
NPR Render Based On UTS (#2)
VTui22 Mar 9, 2024
8aad638
beta ribbon
OVOAOVO Mar 11, 2024
6e2e9b7
Merge branch 'main' into Ribbon
OVOAOVO Mar 11, 2024
da7efb0
skybox
roeas Mar 12, 2024
a334501
fix Ribbon index
OVOAOVO Mar 12, 2024
304498d
ibl
roeas Mar 12, 2024
e15bba1
add Ibl strength for sky component
T-rvw Mar 12, 2024
c01ef2d
Minor refine (#4)
roeas Mar 13, 2024
ac95807
Merge branch 'main' into Ribbon
OVOAOVO Mar 14, 2024
118681f
cs Ribbon(no texture)
OVOAOVO Mar 19, 2024
b4eb790
cs Ribbon (fixed texture color)
OVOAOVO Mar 19, 2024
c61f325
Add Materialcomponent Uber shader
OVOAOVO Mar 20, 2024
dabfd1a
fix null material import
T-rvw Mar 21, 2024
a4ad982
Merge https://github.com/CatDogEngine/CatDogEngine into integrate_fbx…
T-rvw Mar 21, 2024
cf24d5d
fix release post build
T-rvw Mar 21, 2024
a19e317
minor fix
T-rvw Mar 21, 2024
18b8ac0
Integrate fbx producer/consumer
T-rvw Mar 22, 2024
bd32f5a
Shader resource (#5)
roeas Mar 22, 2024
f327f6e
update AssetPipeline
OVOAOVO Mar 25, 2024
45ff69d
AssetPipeline conflict
OVOAOVO Mar 25, 2024
4c6694e
conflict fix
OVOAOVO Mar 25, 2024
2d6e17c
uber vertex shader (#8)
roeas Mar 25, 2024
e49be18
merged main
OVOAOVO Mar 25, 2024
962d7db
Merge branch 'main' of https://github.com/CatDogEngine/CatDogEngine
OVOAOVO Mar 25, 2024
30d0faa
Merge branch 'main' into Ribbon
OVOAOVO Mar 25, 2024
3619462
vs shader feature
OVOAOVO Mar 25, 2024
5ab835d
Fixed Ribbon Count
OVOAOVO Apr 1, 2024
a0eef0f
Visibility functions with different levels of exactness. (#9)
roeas Apr 2, 2024
74230b1
Delete obsolete compiled uber shader file. (#11)
roeas Apr 6, 2024
2320dfa
PBR reflectance parameter (#10)
roeas Apr 6, 2024
c2d4c2f
Ues std::format instead of bundled fmt for spdlog. (#12)
roeas Apr 22, 2024
cf1a754
Low-precision pow approximation (#15)
roeas Apr 26, 2024
0e33e7e
IBL minor adjustments (#14)
roeas Apr 27, 2024
02c121c
Optimize Path::Join by fold expression (#16)
roeas May 11, 2024
69100f2
Fix "Use texture" checkbox crash bug (#17)
roeas May 11, 2024
98e53d5
add skeleton resource (#13)
VTui22 May 11, 2024
93422a4
merge Skeleton resource (#18)
VTui22 May 13, 2024
7c5babd
add pbr and ibl demo and add light shadow switch (#19)
VTui22 May 16, 2024
2af93aa
AssetPipline update
OVOAOVO May 18, 2024
42f9f9c
Merge branch 'main' of https://github.com/CatDogEngine/CatDogEngine
OVOAOVO May 18, 2024
9c27e06
update AssetPipline
OVOAOVO May 18, 2024
c9db3b3
Merge branch 'main' into Ribbon
OVOAOVO May 18, 2024
8cdf767
fix generic producer and free skeleton resource
VTui22 May 18, 2024
67d1abd
Fix generic producer and skeleton resource memory free
T-rvw May 22, 2024
c1ffb47
Add Ribbon Particle
T-rvw May 22, 2024
370289e
add file
OVOAOVO Aug 16, 2024
c0a67c0
add file
OVOAOVO Aug 16, 2024
16883d6
fixed instance
OVOAOVO Aug 17, 2024
11a34eb
remove some test
OVOAOVO Aug 19, 2024
9120a6d
fix unpackHalf2x16
OVOAOVO Aug 19, 2024
91146ec
Index fix(Pack to float Needed)
OVOAOVO Aug 19, 2024
519ec6f
Texture Debug
OVOAOVO Aug 20, 2024
dfa30d3
fix sizeList type
OVOAOVO Aug 20, 2024
cc653f2
fix depthIndex Value
OVOAOVO Aug 21, 2024
0942f79
texture type change
OVOAOVO Aug 22, 2024
f55fc9e
fix color
OVOAOVO Aug 24, 2024
c600a0d
fix ply buffer data
OVOAOVO Aug 27, 2024
416c5ba
fix texturedata
OVOAOVO Aug 27, 2024
9da039c
f_buffer review over
OVOAOVO Aug 27, 2024
70bf0f4
camera define
OVOAOVO Aug 28, 2024
8472bd4
u_view to view
OVOAOVO Aug 28, 2024
3150d84
fix depthIndex
OVOAOVO Aug 28, 2024
3c2895b
Camera Add
OVOAOVO Aug 29, 2024
3b5647f
Add Camera
OVOAOVO Aug 29, 2024
9d47818
change Camera to commented
OVOAOVO Aug 29, 2024
4fcd624
Clear code
roeas Aug 30, 2024
7ebb923
Fix sort
roeas Aug 30, 2024
96e981c
Merge pull request #22 from CatDogEngine/gaussian
OVOAOVO Aug 30, 2024
759de75
Fix vertex data and use BGFX_STATE_PT_TRISTRIP
roeas Aug 31, 2024
de4bcf5
Fix uniform uploading
roeas Aug 31, 2024
9216115
Merge pull request #23 from CatDogEngine/gaussian
OVOAOVO Aug 31, 2024
dd382c1
log close
OVOAOVO Sep 4, 2024
35d5ac3
first achieve
OVOAOVO Sep 4, 2024
194939a
TEXCOORD0_To_TEXCOORD7
OVOAOVO Sep 4, 2024
a3ae49d
backend_To_Vulkkan
OVOAOVO Sep 4, 2024
725ec1a
bgfx state blend change
OVOAOVO Sep 5, 2024
3e08cfb
State Note
OVOAOVO Sep 5, 2024
907a66d
UpdateView change(Not right)
OVOAOVO Sep 6, 2024
53a7ba4
camera review over
OVOAOVO Sep 7, 2024
c35c1f8
vec3 position-> vec2 position
OVOAOVO Sep 10, 2024
2a28c0f
alpha blend
OVOAOVO Sep 10, 2024
06c738d
backend to OpenGL(fix rotation)
OVOAOVO Sep 20, 2024
651822b
aspect fix
OVOAOVO Sep 20, 2024
f0947c4
remove aspect
OVOAOVO Sep 20, 2024
6c0c943
fixed all
OVOAOVO Sep 23, 2024
edf12c8
Remove some comments
OVOAOVO Sep 23, 2024
33609eb
backend To Vulkan (open other renderer)
OVOAOVO Sep 26, 2024
d49f1de
far to near sort
OVOAOVO Sep 26, 2024
084dca9
depth and blend renderer
OVOAOVO Sep 28, 2024
002a315
fix rotation
OVOAOVO Oct 9, 2024
393b600
fix import bug
OVOAOVO Oct 14, 2024
b2cdf69
Code style
roeas Oct 23, 2024
43c0d7e
Fix OpenGL backend
roeas Oct 23, 2024
424275c
Temporary solution
roeas Oct 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix OpenGL backend
  • Loading branch information
roeas committed Oct 23, 2024
commit 43c0d7ed39fb24f9ef6a5d474a4526ca5ba8cca5
13 changes: 8 additions & 5 deletions Engine/BuiltInShaders/common/LightSource.sh
Original file line number Diff line number Diff line change
@@ -42,9 +42,9 @@ U_Light GetLightParams(int pointer) {
light.height = u_lightParams[pointer + 4].y;
light.lightAngleScale = u_lightParams[pointer + 4].z;
light.lightAngleOffeset = u_lightParams[pointer + 4].w;
light.shadowType = asint(u_lightParams[pointer + 5].x);
light.lightViewProjOffset = asint(u_lightParams[pointer + 5].y);
light.cascadeNum = asint(u_lightParams[pointer + 5].z);
light.shadowType = floatBitsToInt(u_lightParams[pointer + 5].x);
light.lightViewProjOffset = floatBitsToInt(u_lightParams[pointer + 5].y);
light.cascadeNum = floatBitsToInt(u_lightParams[pointer + 5].z);
light.shadowBias = u_lightParams[pointer + 5].z;
light.frustumClips = u_lightParams[pointer + 6];
return light;
@@ -329,12 +329,15 @@ vec3 CalculateCelDirectionalLight(U_Light light, Material material, vec3 worldPo

float firstShadowMask = saturate(1.0 - (halfLambert - (dividLine.x - dividLine.y)) / dividLine.y); // albedo and 1st shadow
float secondShadowMask = saturate (1.0 - (halfLambert - (dividLine.z - dividLine.w)) / dividLine.w); // 1st shadow and 2st shadow
vec3 finalBaseColor = lerp(material.albedo, lerp(celParameter.firstShadowColor, celParameter.secondShadowColor, secondShadowMask), firstShadowMask);
vec3 finalBaseColor = mix(material.albedo, mix(celParameter.firstShadowColor, celParameter.secondShadowColor, vec3_splat(firstShadowMask)), vec3_splat(firstShadowMask));

// Specular
float halfSpecular = 0.5 * NdotH + 0.5;
vec4 specular = celParameter.specular;
vec3 specularMask = specular.y * lerp(1.0 - step(halfSpecular, (1.0 - pow(specular.x, 5.0))), pow(halfSpecular, exp2(lerp(11.0, 1.0, specular.x))), specular.w);
vec3 specularMask = vec3_splat(specular.y * mix(
1.0 - step(halfSpecular, (1.0 - pow(specular.x, 5.0))),
pow(halfSpecular, exp2(mix(11.0, 1.0, specular.x))),
specular.w));
vec3 specularColor = light.color * specularMask * vec3_splat(((1.0 - firstShadowMask) + (firstShadowMask * specular.z)) * light.intensity);

// Rim
2 changes: 1 addition & 1 deletion Engine/BuiltInShaders/common/Material.sh
Original file line number Diff line number Diff line change
@@ -119,7 +119,7 @@ Material GetMaterial(vec2 uv, vec3 normal, mat3 TBN) {
#endif

float refectance = u_metallicRoughnessRefectanceFactor.z;
material.F0 = mix(0.16 * refectance * refectance, material.albedo, material.metallic);
material.F0 = mix(vec3_splat(0.16 * refectance * refectance), material.albedo, material.metallic);

return material;
}
7 changes: 4 additions & 3 deletions Engine/BuiltInShaders/shaders/fs_PBR.sc
Original file line number Diff line number Diff line change
@@ -41,8 +41,9 @@ void main()
vec3 emiColor = material.emissive * u_emissiveColorAndFactor.xyz * vec3_splat(u_emissiveColorAndFactor.w);

// Fragment Color
gl_FragData[0] = vec4(dirColor + envColor + emiColor, 1.0);
gl_FragData[1] = vec4(emiColor, 1.0);

// gl_FragData[0] = vec4(dirColor + envColor + emiColor, 1.0);
// gl_FragData[1] = vec4(emiColor, 1.0);
gl_FragColor = vec4(dirColor + envColor + emiColor, 1.0);

// Post-processing will be used in the last pass.
}
150 changes: 75 additions & 75 deletions Engine/Source/Editor/EditorApp.cpp
Original file line number Diff line number Diff line change
@@ -263,17 +263,17 @@ void EditorApp::InitECWorld()
void EditorApp::InitMaterialType()
{
m_pRenderContext->RegisterShaderProgram("WorldProgram", "vs_PBR", "fs_PBR");
m_pRenderContext->RegisterShaderProgram("AnimationProgram", "vs_animation", "fs_animation");
m_pRenderContext->RegisterShaderProgram("TerrainProgram", "vs_terrain", "fs_terrain");
m_pRenderContext->RegisterShaderProgram("ParticleProgram", "vs_particleSprite", "fs_particleSprite");
m_pRenderContext->RegisterShaderProgram("CelluloidProgram", "vs_celluloid", "fs_celluloid");
// m_pRenderContext->RegisterShaderProgram("AnimationProgram", "vs_animation", "fs_animation");
// m_pRenderContext->RegisterShaderProgram("TerrainProgram", "vs_terrain", "fs_terrain");
// m_pRenderContext->RegisterShaderProgram("ParticleProgram", "vs_particleSprite", "fs_particleSprite");
// m_pRenderContext->RegisterShaderProgram("CelluloidProgram", "vs_celluloid", "fs_celluloid");

m_pSceneWorld = std::make_unique<engine::SceneWorld>();
m_pSceneWorld->CreatePBRMaterialType("WorldProgram", IsAtmosphericScatteringEnable());
m_pSceneWorld->CreateAnimationMaterialType("AnimationProgram");
m_pSceneWorld->CreateTerrainMaterialType("TerrainProgram");
m_pSceneWorld->CreateParticleMaterialType("ParticleProgram");
m_pSceneWorld->CreateCelluloidMaterialType("CelluloidProgram");
// m_pSceneWorld->CreateAnimationMaterialType("AnimationProgram");
// m_pSceneWorld->CreateTerrainMaterialType("TerrainProgram");
// m_pSceneWorld->CreateParticleMaterialType("ParticleProgram");
// m_pSceneWorld->CreateCelluloidMaterialType("CelluloidProgram");
}

void EditorApp::InitEditorCameraEntity()
@@ -477,70 +477,70 @@ void EditorApp::InitEngineRenderers()
// The init size doesn't make sense. It will resize by SceneView.
engine::RenderTarget* pSceneRenderTarget = m_pRenderContext->CreateRenderTarget(sceneViewRenderTargetName, 1, 1, std::move(attachmentDesc));

auto pShadowMapRenderer = std::make_unique<engine::ShadowMapRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
m_pShadowMapRenderer = pShadowMapRenderer.get();
pShadowMapRenderer->SetSceneWorld(m_pSceneWorld.get());
AddEngineRenderer(cd::MoveTemp(pShadowMapRenderer));
// auto pShadowMapRenderer = std::make_unique<engine::ShadowMapRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
// m_pShadowMapRenderer = pShadowMapRenderer.get();
// pShadowMapRenderer->SetSceneWorld(m_pSceneWorld.get());
// AddEngineRenderer(cd::MoveTemp(pShadowMapRenderer));

auto pSkyboxRenderer = std::make_unique<engine::SkyboxRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
m_pIBLSkyRenderer = pSkyboxRenderer.get();
pSkyboxRenderer->SetSceneWorld(m_pSceneWorld.get());
AddEngineRenderer(cd::MoveTemp(pSkyboxRenderer));

if (IsAtmosphericScatteringEnable())
{
auto pPBRSkyRenderer = std::make_unique<engine::PBRSkyRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
m_pPBRSkyRenderer = pPBRSkyRenderer.get();
pPBRSkyRenderer->SetSceneWorld(m_pSceneWorld.get());
AddEngineRenderer(cd::MoveTemp(pPBRSkyRenderer));
}

auto pSkeletonRenderer = std::make_unique<engine::SkeletonRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
pSkeletonRenderer->SetSceneWorld(m_pSceneWorld.get());
AddEngineRenderer(cd::MoveTemp(pSkeletonRenderer));

auto pAnimationRenderer = std::make_unique<engine::AnimationRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
pAnimationRenderer->SetSceneWorld(m_pSceneWorld.get());
AddEngineRenderer(cd::MoveTemp(pAnimationRenderer));

// if (IsAtmosphericScatteringEnable())
// {
// auto pPBRSkyRenderer = std::make_unique<engine::PBRSkyRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
// m_pPBRSkyRenderer = pPBRSkyRenderer.get();
// pPBRSkyRenderer->SetSceneWorld(m_pSceneWorld.get());
// AddEngineRenderer(cd::MoveTemp(pPBRSkyRenderer));
// }
//
// auto pSkeletonRenderer = std::make_unique<engine::SkeletonRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
// pSkeletonRenderer->SetSceneWorld(m_pSceneWorld.get());
// AddEngineRenderer(cd::MoveTemp(pSkeletonRenderer));
//
// auto pAnimationRenderer = std::make_unique<engine::AnimationRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
// pAnimationRenderer->SetSceneWorld(m_pSceneWorld.get());
// AddEngineRenderer(cd::MoveTemp(pAnimationRenderer));
auto pSceneRenderer = std::make_unique<engine::WorldRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
m_pSceneRenderer = pSceneRenderer.get();
pSceneRenderer->SetSceneWorld(m_pSceneWorld.get());
AddEngineRenderer(cd::MoveTemp(pSceneRenderer));

auto pCelluloidRenderer = std::make_unique<engine::CelluloidRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
m_pCelluloidRenderer = pCelluloidRenderer.get();
pCelluloidRenderer->SetSceneWorld(m_pSceneWorld.get());
AddEngineRenderer(cd::MoveTemp(pCelluloidRenderer));

auto pOutLineRenderer = std::make_unique<engine::OutLineRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
m_pOutLineRenderer = pOutLineRenderer.get();
pOutLineRenderer->SetSceneWorld(m_pSceneWorld.get());
AddEngineRenderer(cd::MoveTemp(pOutLineRenderer));

auto pBlendShapeRenderer = std::make_unique<engine::BlendShapeRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
pBlendShapeRenderer->SetSceneWorld(m_pSceneWorld.get());
AddEngineRenderer(cd::MoveTemp(pBlendShapeRenderer));

auto pTerrainRenderer = std::make_unique<engine::TerrainRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
m_pTerrainRenderer = pTerrainRenderer.get();
pTerrainRenderer->SetSceneWorld(m_pSceneWorld.get());
AddEngineRenderer(cd::MoveTemp(pTerrainRenderer));

auto pWhiteModelRenderer = std::make_unique<engine::WhiteModelRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
m_pWhiteModelRenderer = pWhiteModelRenderer.get();
pWhiteModelRenderer->SetSceneWorld(m_pSceneWorld.get());
pWhiteModelRenderer->SetEnable(false);
AddEngineRenderer(cd::MoveTemp(pWhiteModelRenderer));

auto pParticleRenderer = std::make_unique<engine::ParticleRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
pParticleRenderer->SetSceneWorld(m_pSceneWorld.get());
AddEngineRenderer(cd::MoveTemp(pParticleRenderer));

auto pParticleForceFieldRenderer = std::make_unique<engine::ParticleForceFieldRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
pParticleForceFieldRenderer->SetSceneWorld(m_pSceneWorld.get());
AddEngineRenderer(cd::MoveTemp(pParticleForceFieldRenderer));

// auto pCelluloidRenderer = std::make_unique<engine::CelluloidRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
// m_pCelluloidRenderer = pCelluloidRenderer.get();
// pCelluloidRenderer->SetSceneWorld(m_pSceneWorld.get());
// AddEngineRenderer(cd::MoveTemp(pCelluloidRenderer));
//
// auto pOutLineRenderer = std::make_unique<engine::OutLineRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
// m_pOutLineRenderer = pOutLineRenderer.get();
// pOutLineRenderer->SetSceneWorld(m_pSceneWorld.get());
// AddEngineRenderer(cd::MoveTemp(pOutLineRenderer));
//
// auto pBlendShapeRenderer = std::make_unique<engine::BlendShapeRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
// pBlendShapeRenderer->SetSceneWorld(m_pSceneWorld.get());
// AddEngineRenderer(cd::MoveTemp(pBlendShapeRenderer));
//
// auto pTerrainRenderer = std::make_unique<engine::TerrainRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
// m_pTerrainRenderer = pTerrainRenderer.get();
// pTerrainRenderer->SetSceneWorld(m_pSceneWorld.get());
// AddEngineRenderer(cd::MoveTemp(pTerrainRenderer));
//
// auto pWhiteModelRenderer = std::make_unique<engine::WhiteModelRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
// m_pWhiteModelRenderer = pWhiteModelRenderer.get();
// pWhiteModelRenderer->SetSceneWorld(m_pSceneWorld.get());
// pWhiteModelRenderer->SetEnable(false);
// AddEngineRenderer(cd::MoveTemp(pWhiteModelRenderer));
//
// auto pParticleRenderer = std::make_unique<engine::ParticleRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
// pParticleRenderer->SetSceneWorld(m_pSceneWorld.get());
// AddEngineRenderer(cd::MoveTemp(pParticleRenderer));
//
// auto pParticleForceFieldRenderer = std::make_unique<engine::ParticleForceFieldRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
// pParticleForceFieldRenderer->SetSceneWorld(m_pSceneWorld.get());
// AddEngineRenderer(cd::MoveTemp(pParticleForceFieldRenderer));
auto pGaussianRenderer = std::make_unique<engine::GaussianRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
pGaussianRenderer->SetSceneWorld(m_pSceneWorld.get());
AddEngineRenderer(cd::MoveTemp(pGaussianRenderer));
@@ -551,23 +551,23 @@ void EditorApp::InitEngineRenderers()
AddEngineRenderer(cd::MoveTemp(pDDGIRenderer));
#endif

auto pAABBRenderer = std::make_unique<engine::AABBRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
m_pAABBRenderer = pAABBRenderer.get();
pAABBRenderer->SetSceneWorld(m_pSceneWorld.get());
AddEngineRenderer(cd::MoveTemp(pAABBRenderer));

auto pWireframeRenderer = std::make_unique<engine::WireframeRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
m_pWireframeRenderer = pWireframeRenderer.get();
pWireframeRenderer->SetSceneWorld(m_pSceneWorld.get());
AddEngineRenderer(cd::MoveTemp(pWireframeRenderer));
// auto pAABBRenderer = std::make_unique<engine::AABBRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
// m_pAABBRenderer = pAABBRenderer.get();
// pAABBRenderer->SetSceneWorld(m_pSceneWorld.get());
// AddEngineRenderer(cd::MoveTemp(pAABBRenderer));
//
// auto pWireframeRenderer = std::make_unique<engine::WireframeRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
// m_pWireframeRenderer = pWireframeRenderer.get();
// pWireframeRenderer->SetSceneWorld(m_pSceneWorld.get());
// AddEngineRenderer(cd::MoveTemp(pWireframeRenderer));

auto pBlitRTRenderPass = std::make_unique<engine::BlitRenderTargetPass>(m_pRenderContext->CreateView(), pSceneRenderTarget);
AddEngineRenderer(cd::MoveTemp(pBlitRTRenderPass));

auto pBloomRenderer = std::make_unique<engine::BloomRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
pBloomRenderer->SetSceneWorld(m_pSceneWorld.get());
pBloomRenderer->SetEnable(false);
AddEngineRenderer(cd::MoveTemp(pBloomRenderer));
// auto pBloomRenderer = std::make_unique<engine::BloomRenderer>(m_pRenderContext->CreateView(), pSceneRenderTarget);
// pBloomRenderer->SetSceneWorld(m_pSceneWorld.get());
// pBloomRenderer->SetEnable(false);
// AddEngineRenderer(cd::MoveTemp(pBloomRenderer));

// We can debug vertex/material/texture information by just output that to screen as fragmentColor.
// But postprocess will bring unnecessary confusion.
2 changes: 1 addition & 1 deletion Engine/Source/Editor/Main.cpp
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ int main()
pEngine->Init({ .pTitle = "CatDogEditor", .pIconFilePath = "editor_icon.png",
.width = 1280, .height = 720, .useFullScreen = false,
.language = Language::ChineseSimplied,
.backend = GraphicsBackend::Vulkan, .compileAllShaders = false });
.backend = GraphicsBackend::OpenGL, .compileAllShaders = false });

pEngine->Run();