Kaynağa Gözat

timer, mark ssao

Alexander Rose 2 yıl önce
ebeveyn
işleme
0585f7b9ca
1 değiştirilmiş dosya ile 2 ekleme ve 0 silme
  1. 2 0
      src/mol-canvas3d/passes/postprocessing.ts

+ 2 - 0
src/mol-canvas3d/passes/postprocessing.ts

@@ -734,6 +734,7 @@ export class PostprocessingPass {
         // don't render occlusion if offset is given,
         // don't render occlusion if offset is given,
         // which will reuse the existing occlusion
         // which will reuse the existing occlusion
         if (props.occlusion.name === 'on' && this.occlusionOffset[0] === 0 && this.occlusionOffset[1] === 0) {
         if (props.occlusion.name === 'on' && this.occlusionOffset[0] === 0 && this.occlusionOffset[1] === 0) {
+            if (isTimingMode) this.webgl.timer.mark('SSAO.render');
             if (this.ssaoScale < 1) {
             if (this.ssaoScale < 1) {
                 this.downsampledDepthTarget.bind();
                 this.downsampledDepthTarget.bind();
                 this.downsampleDepthRenderable.render();
                 this.downsampleDepthRenderable.render();
@@ -747,6 +748,7 @@ export class PostprocessingPass {
 
 
             this.ssaoBlurSecondPassFramebuffer.bind();
             this.ssaoBlurSecondPassFramebuffer.bind();
             this.ssaoBlurSecondPassRenderable.render();
             this.ssaoBlurSecondPassRenderable.render();
+            if (isTimingMode) this.webgl.timer.markEnd('SSAO.render');
         }
         }
 
 
         if (toDrawingBuffer) {
         if (toDrawingBuffer) {