fix deferred pipeline webgl2.0 depth stencil with linear sampling (#11110)

This commit is contained in:
jk20012001
2022-05-16 14:44:16 +08:00
committed by GitHub
parent 4d426ccbd1
commit 279af9ce29
@@ -306,12 +306,14 @@ export class DeferredPipeline extends RenderPipeline {
data.outputRenderTargets,
null,
));
data.sampler = this.globalDSManager.pointSampler;
// Listens when the attachment texture is scaled
this.on(PipelineEventType.ATTACHMENT_SCALE_CAHNGED, (val: number) => {
data.sampler = val < 1 ? this.globalDSManager.pointSampler : this.globalDSManager.linearSampler;
this.applyFramebufferRatio(data.gbufferFrameBuffer);
this.applyFramebufferRatio(data.outputFrameBuffer);
});
data.sampler = this.globalDSManager.linearSampler;
}
}