[orx-fx] Add depth buffer to Post

This commit is contained in:
Edwin Jakobs
2022-08-23 10:53:16 +02:00
parent 0b77cb9429
commit 32d183ec82
2 changed files with 11 additions and 1 deletions

View File

@@ -3,6 +3,8 @@ import org.openrndr.application
import org.openrndr.extra.fx.Post
import org.openrndr.extra.fx.blend.Add
import org.openrndr.extra.fx.blur.ApproximateGaussianBlur
import org.openrndr.shape.Circle
import kotlin.math.cos
fun main() = application {
configure {
@@ -14,7 +16,7 @@ fun main() = application {
val add = Add()
post { input, output ->
blur.window = 50
blur.sigma = 50.0
blur.sigma = 50.0 * (cos(seconds) * 0.5 + 0.5)
blur.apply(input, intermediate[0])
add.apply(arrayOf(input, intermediate[0]), output)
}