diff --git a/Engine/Source/Runtime/Rendering/ParticleRenderer.cpp b/Engine/Source/Runtime/Rendering/ParticleRenderer.cpp index 59204f06..7f8693c1 100644 --- a/Engine/Source/Runtime/Rendering/ParticleRenderer.cpp +++ b/Engine/Source/Runtime/Rendering/ParticleRenderer.cpp @@ -8,17 +8,18 @@ namespace engine { void ParticleRenderer::Init() { - constexpr const char* particleTexture = "Textures/Particle.png"; - m_particleTextureHandle = GetRenderContext()->CreateTexture(particleTexture); - - GetRenderContext()->CreateUniform("s_texColor", bgfx::UniformType::Sampler); - GetRenderContext()->CreateProgram("ParticleProgram", "vs_particle.bin", "fs_particle.bin"); + constexpr StringCrc ParticleProgram = StringCrc{ "ParticleProgram" }; + GetRenderContext()->RegisterShaderProgram(ParticleProgram, { "vs_PBR", "fs_PBR" }); + //GetRenderContext()->CreateProgram("ParticleProgram", "vs_particle.bin", "fs_particle.bin"); bgfx::setViewName(GetViewID(), "ParticleRenderer"); } void ParticleRenderer::Warmup() { - + constexpr const char* particleTexture = "Textures/Particle.png"; + m_particleTextureHandle = GetRenderContext()->CreateTexture(particleTexture); + GetRenderContext()->CreateUniform("s_texColor", bgfx::UniformType::Sampler); + GetRenderContext()->UploadShaderProgram("ParticleProgram"); } void ParticleRenderer::UpdateView(const float* pViewMatrix, const float* pProjectionMatrix) @@ -71,8 +72,7 @@ void ParticleRenderer::Render(float deltaTime) BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_INV_SRC_ALPHA) | BGFX_STATE_PT_TRISTRIP; bgfx::setState(state); - constexpr StringCrc ParticleProgram("ParticleProgram"); - bgfx::submit(GetViewID(), GetRenderContext()->GetProgram(ParticleProgram)); + GetRenderContext()->Submit(GetViewID(), "ParticleProgram"); } } diff --git a/Engine/Source/ThirdParty/AssetPipeline b/Engine/Source/ThirdParty/AssetPipeline index 6133ac03..8389fc35 160000 --- a/Engine/Source/ThirdParty/AssetPipeline +++ b/Engine/Source/ThirdParty/AssetPipeline @@ -1 +1 @@ -Subproject commit 6133ac03e9854ed4c6116a3addd229a254bb3ef1 +Subproject commit 8389fc35dce8826b48c1c549ebc4e2e2c127c895