Skip to content

Does setting BlendFunction.SKIP avoid calculating a pass, or just skip blending? #315

Answered by vanruesc
looeee asked this question in Q&A
Discussion options

You must be logged in to vote

Setting the blend function of an effect's blendMode via setBlendFunction() will always trigger a recompilation of the associated effect material. When the blend function is set to BlendFunction.SKIP, the effect's main fragment shader won't be integrated into the final shader at all, but the update() method of the effect will still be called. This is because the effect may render to offscreen render targets (like the bloom overlay) which could be used by other effects further down the pipeline.

If I see performance regression and set Bloom and SSAO to BlendFunction.SKIP, will that immediately skip the calculation of those passes?

Not entirely. Bloom and SSAO won't show up in the effect s…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@looeee
Comment options

@vanruesc
Comment options

@looeee
Comment options

@vanruesc
Comment options

@looeee
Comment options

Answer selected by looeee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants