Bump OPENRNDR to 0.3.37

This commit is contained in:
Edwin Jakobs
2019-12-11 21:05:27 +01:00
parent d192519e5c
commit 875e05c130
10 changed files with 32 additions and 10 deletions

View File

@@ -0,0 +1,3 @@
dependencies {
compile project(":orx-fx")
}

View File

@@ -1,7 +1,8 @@
package org.openrndr.extra.integralimage
import org.openrndr.draw.*
import org.openrndr.filter.blend.passthrough
import org.openrndr.extra.fx.blend.Passthrough
import org.openrndr.math.Vector2
import org.openrndr.resourceUrl
@@ -18,6 +19,7 @@ class FastIntegralImageFilter : Filter(filterShaderFromUrl(resourceUrl(
class FastIntegralImage : Filter(filterShaderFromUrl(resourceUrl(
"/shaders/gl3/integral-image.frag"
))) {
private val passthrough = Passthrough()
var intermediate: ColorBuffer? = null
val filter = FastIntegralImageFilter()
@@ -55,7 +57,7 @@ class FastIntegralImage : Filter(filterShaderFromUrl(resourceUrl(
filter.sampleCountBase = sampleCountBase
filter.passDirection = Vector2.UNIT_X
for (pass in 0 until xSampleCounts.size) {
for (pass in xSampleCounts.indices) {
filter.sampleCount = xSampleCounts[pass]
filter.passIndex = pass
filter.apply( if (pass == 0) source else targets[targetIndex%2], targets[(targetIndex+1)%2])
@@ -63,7 +65,7 @@ class FastIntegralImage : Filter(filterShaderFromUrl(resourceUrl(
}
filter.passDirection = Vector2.UNIT_Y
for (pass in 0 until ySampleCounts.size) {
for (pass in ySampleCounts.indices) {
filter.sampleCount = ySampleCounts[pass]
filter.passIndex = pass
filter.apply( targets[targetIndex%2], targets[(targetIndex+1)%2])