Skip to content

Commit

Permalink
Fix Background Draw (galacean#675)
Browse files Browse the repository at this point in the history
Co-authored-by: gz65555 <kevin.hs@antgroup.com>
  • Loading branch information
gz65555 and gz65555 authored Mar 4, 2022
1 parent d6b3bc8 commit 72cc520
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/core/src/RenderPipeline/BasicRenderPipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,12 @@ export class BasicRenderPipeline {
} else {
this._opaqueQueue.render(camera, pass.replaceMaterial, pass.mask);
this._alphaTestQueue.render(camera, pass.replaceMaterial, pass.mask);
if (background.mode === BackgroundMode.Sky) {
this._drawSky(engine, camera, background.sky);
} else if (background.mode === BackgroundMode.Texture && background.texture) {
this._drawBackgroundTexture(engine, background);
if (camera.clearFlags === CameraClearFlags.DepthColor) {
if (background.mode === BackgroundMode.Sky) {
this._drawSky(engine, camera, background.sky);
} else if (background.mode === BackgroundMode.Texture && background.texture) {
this._drawBackgroundTexture(engine, background);
}
}
this._transparentQueue.render(camera, pass.replaceMaterial, pass.mask);
}
Expand Down

0 comments on commit 72cc520

Please sign in to comment.