Bump OPENRNDR to 0.3.37
This commit is contained in:
3
orx-integral-image/build.gradle
Normal file
3
orx-integral-image/build.gradle
Normal file
@@ -0,0 +1,3 @@
|
||||
dependencies {
|
||||
compile project(":orx-fx")
|
||||
}
|
||||
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user