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 | ec344991e12cf52e52d6dbce961493248522e250 (patch) | |
| tree | a5884837f939d6fbdbef096505135e57e21d26fb /src/main/kotlin/phenax/utils | |
| parent | 33c04916d264455abdb72a39bffb105ac3580627 (diff) | |
| download | art-playground-openrndr-ec344991e12cf52e52d6dbce961493248522e250.tar.gz art-playground-openrndr-ec344991e12cf52e52d6dbce961493248522e250.zip | |
Refactor stuff
Diffstat (limited to '')
| -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()) } |
