fix: 暂时去除后处理

This commit is contained in:
yuqi.pyq 2020-10-26 17:44:58 +08:00
parent fdfc88f882
commit 63af07af86
5 changed files with 22 additions and 23 deletions

View File

@ -14,6 +14,7 @@ exports.onCreateWebpackConfig = ({ getConfig }) => {
'@antv/l7-core': path.resolve(__dirname, 'packages/core/src'),
'@antv/l7-component': path.resolve(__dirname, 'packages/component/src'),
'@antv/l7-layers': path.resolve(__dirname, 'packages/layers/src'),
'@antv/l7-map': path.resolve(__dirname, 'packages/map/src'),
'@antv/l7-maps': path.resolve(__dirname, 'packages/maps/src'),
'@antv/l7-renderer': path.resolve(__dirname, 'packages/renderer/src'),
'@antv/l7-scene': path.resolve(__dirname, 'packages/scene/src'),

View File

@ -68,7 +68,7 @@ export default class MultiPassRenderer implements IMultiPassRenderer {
public resize(width: number, height: number) {
if (this.width !== width || this.height !== height) {
this.postProcessor.resize(width, height);
// this.postProcessor.resize(width, height);
this.width = width;
this.height = height;
}

View File

@ -79,24 +79,23 @@ export default class PostProcessor implements IPostProcessor {
@postConstruct()
private init() {
const { createFramebuffer, createTexture2D } = this.rendererService;
this.readFBO = createFramebuffer({
color: createTexture2D({
width: 1,
height: 1,
wrapS: gl.CLAMP_TO_EDGE,
wrapT: gl.CLAMP_TO_EDGE,
}),
});
this.writeFBO = createFramebuffer({
color: createTexture2D({
width: 1,
height: 1,
wrapS: gl.CLAMP_TO_EDGE,
wrapT: gl.CLAMP_TO_EDGE,
}),
});
// const { createFramebuffer, createTexture2D } = this.rendererService;
// this.readFBO = createFramebuffer({
// color: createTexture2D({
// width: 1,
// height: 1,
// wrapS: gl.CLAMP_TO_EDGE,
// wrapT: gl.CLAMP_TO_EDGE,
// }),
// });
// this.writeFBO = createFramebuffer({
// color: createTexture2D({
// width: 1,
// height: 1,
// wrapS: gl.CLAMP_TO_EDGE,
// wrapT: gl.CLAMP_TO_EDGE,
// }),
// });
}
private isLastEnabledPass(index: number): boolean {

View File

@ -24,13 +24,13 @@ export default class RenderPass<
public render(layer: ILayer) {
const { useFramebuffer, clear } = this.rendererService;
const readFBO = layer.multiPassRenderer.getPostProcessor().getReadFBO();
useFramebuffer(readFBO, () => {
// const readFBO = layer.multiPassRenderer.getPostProcessor().getReadFBO();
useFramebuffer(null, () => {
clear({
color: [0, 0, 0, 0],
depth: 1,
stencil: 0,
framebuffer: readFBO,
// framebuffer: readFBO,
});
// render to post processor

View File

@ -23,7 +23,6 @@
"@antv/l7-map": ["packages/map/src"],
"@antv/l7-maps": ["packages/maps/src"],
"@antv/l7-scene": ["packages/scene/src"],
"@antv/l7-scene": ["packages/scene/src"],
"@antv/l7-renderer": ["packages/renderer/src"],
"@antv/l7-three": ["packages/three/src"],
"@antv/l7-source": ["packages/source/src"],