aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/placenta
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2026-10-20 23:34:05 +0530
committerAkshay Nair <phenax5@gmail.com>2026-10-20 23:34:05 +0530
commitbfd7af6c4772c68f001c5c121b62b134bbca04e4 (patch)
tree83141b998d5bf1abd41bb57f47b394abbfbd579d /src/main/kotlin/placenta
parenta2cbcea7144380cfa51d050530251c1dd9bc4d1a (diff)
downloadart-playground-openrndr-bfd7af6c4772c68f001c5c121b62b134bbca04e4.tar.gz
art-playground-openrndr-bfd7af6c4772c68f001c5c121b62b134bbca04e4.zip
Add placenta
Diffstat (limited to '')
-rw-r--r--src/main/kotlin/placenta/PlacentaProgram.kt41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/main/kotlin/placenta/PlacentaProgram.kt b/src/main/kotlin/placenta/PlacentaProgram.kt
new file mode 100644
index 0000000..2971110
--- /dev/null
+++ b/src/main/kotlin/placenta/PlacentaProgram.kt
@@ -0,0 +1,41 @@
+package placenta
+
+import org.openrndr.application
+import org.openrndr.color.*
+import org.openrndr.draw.*
+import org.openrndr.extra.noise.filters.SimplexNoise3D
+import org.openrndr.math.Vector3
+import phenax.utils.*
+
+fun main() = application {
+ recordDuration(5.seconds())
+
+ if (captureEnabled) {
+ configure {
+ width = 1920
+ height = 1440
+ windowResizable = false
+ }
+ } else {
+ configure {
+ width = 640
+ height = 480
+ windowResizable = false
+ }
+ }
+
+ oliveProgram {
+ val enableAntialiasing = captureEnabled
+ val cs by liveComputeShader("placenta")
+
+ val outputBuffer = colorBuffer(width, height, type = ColorType.UINT8)
+
+ extend {
+ cs.uniform("enable_antialiasing", enableAntialiasing)
+ cs.uniform("seconds", seconds)
+ cs.image("output_image", 0, outputBuffer.imageBinding(0, ImageAccess.WRITE))
+ cs.execute(outputBuffer.width, outputBuffer.height, 1)
+ drawer.image(outputBuffer)
+ }
+ }
+}