diff options
| author | Akshay Nair <phenax5@gmail.com> | 2026-09-14 11:46:56 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2026-09-14 11:46:56 +0530 |
| commit | 707c8896cef6bff291f5d2f3339cf9bf46ee2242 (patch) | |
| tree | fd62d97b8d92c0b0cc8ff817ce2477df771d20d7 /src/main/kotlin/phenax/utils/program.kt | |
| parent | 42b66232530f933b184d446a7461e2e9f8d42bce (diff) | |
| download | art-playground-openrndr-707c8896cef6bff291f5d2f3339cf9bf46ee2242.tar.gz art-playground-openrndr-707c8896cef6bff291f5d2f3339cf9bf46ee2242.zip | |
Refactor stuff
Diffstat (limited to 'src/main/kotlin/phenax/utils/program.kt')
| -rw-r--r-- | src/main/kotlin/phenax/utils/program.kt | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/main/kotlin/phenax/utils/program.kt b/src/main/kotlin/phenax/utils/program.kt index d3788ea..ced3e3a 100644 --- a/src/main/kotlin/phenax/utils/program.kt +++ b/src/main/kotlin/phenax/utils/program.kt @@ -8,11 +8,6 @@ import org.openrndr.draw.* import org.openrndr.extra.filewatcher.watchingFile import org.openrndr.extra.olive.oliveProgram as oliveProgramOriginal -enum class ActionType { - PAN, - LIGHT_MOVE -} - fun Int.seconds(): Int = this * 1000 fun Int.minutes(): Int = this.seconds() * 60 @@ -51,7 +46,7 @@ fun preprocessShader(shaderCode: String): String { parts.add(shaderCode.slice(lastIndex..(it.range.first - 1))) lastIndex = it.range.last + 1 val modulePath = it.groupValues[1] - val moduleContents = File("src/main/resources/shaders/modules/${modulePath}.cs").readText() + val moduleContents = File("src/main/resources/shaders/modules/${modulePath}.glsl").readText() parts.add("/* Module ${modulePath} */") parts.add(moduleContents) parts.add("/* End module ${modulePath} */") @@ -64,7 +59,7 @@ val defaultShaderCode: String = "" fun Program.liveComputeShader(name: String): ReadOnlyProperty<Any?, ComputeShader> { val shaderCode by - watchingFile(File("src/main/resources/shaders/${name}.cs")) { file -> + watchingFile(File("src/main/resources/shaders/${name}.glsl")) { file -> println("change") preprocessShader(file.readText().toString()) } |
