- Enables shader writing in Kotlin.
- Gather runtime information from shaders without programmer intervention
class VertexColorFragmentShader : DebuggableShader() {
private val outCol by varying(::Vec3)
init {
val color by vec4(outCol, 1.0f)
gl_FragColor = color
}
}
- Provides a runtime environment that evaluates shaders and displays the gathered data.
- Enables the developer to place breakpoints in the code and see the values of the variables.
For generating GLSL code from Kotlin there is already a library. This project is a fork of that, the code generator has been modified to accommodate features for debugging at runtime.
The user interface is a React web application written in Kotlin, displaying the generated code and running the simulation created by the user with the shaders. Evaluation is done using WebGL.
After you cloned the repository and opened a terminal in the root directory of the project, run the application with the following command on Windows:
./gradlew.bat clientRun
or on Linux/MacOS:
./gradlew clientRun