ScratchData LogoScratchData
Back to bobbybee's profile

Real-time box blur

BObobbybee•Created February 1, 2020
Real-time box blur
28
16
227 views
View on Scratch

Instructions

Just a little demo of doing convolutions with repeated stamping. We use a ghost effect to set the coefficients (for a box blur, but a Gaussian blur should be possible as well with the same perf, just more code). The trick is to note that the ghost effect multiplies both the colour itself and also sets the alpha used in Scratch's GL_ONE, GL_ONE_MINUS_SRC_ALPHA rendering. Working out the coefficients is left as an exercise :) Hint: the blending equation works out with repeated draws as k_1 a_1 + (1 - k_1) (k_2 a_2 + (1 - k_2) (k_3 + ...

Description

<3

Project Details

Project ID364429639
CreatedFebruary 1, 2020
Last ModifiedAugust 5, 2022
SharedFebruary 1, 2020
Visibilityvisible
CommentsAllowed