What work was done
The goal of the project was to develop a shader editing tool for the Processing Development Environment (PDE) that updates the PDE sketch display window in real-time. It was decided to use an existing open-source shader editor as the starting point as building the entire tool from scratch would be impossible to complete within the 3 month time period of GSOC. After searching a number of options, Shdr was chosen as the starting point.
creating data folder inside the sketch folder if it was absent
creating default shader files inside data folder
storing Shader Editor contents to temp folder if sketch is untitled
sending updated path of data folder to Shader Editor once untitled sketch is saved
What work is left
Though almost all the basic targeted features of the Shader Editor tool were implemented, some were still left unaccomplished because of time constraint and the challenges they posed. One of them was solving the naming conflict between some of Shdr and PDE's default shader uniform variables. Since this issue was unsolved, Shdr is unable to show a visual output in it's own rendering window when user declares uniform variables inside the Shdr's text editor that are unrecognizable by it. This also meant that uniform variables passed to the Shdr from the sketch would have null/zero values as well.
For now, Shader Editor would only work for exactly two shader files i.e vertex and fragment file. It would not work if any of them is missing(when PDE uses it's default vertex shader).
The next big challenge was creating a smoothly running IPC system between the PDE and Shdr and within electron between the main and renderer process. Making sure that both the IPCs worked simultaneously was also a challenge as sometimes one would block the other. The initial IPC system had to go through a number of iterations before it was able to accomplish all the required tasks. These iterations were spread out throughout the 3 month period, taking place as more features were being added. These challenges have been explained in detail in the weekly reports.
Another challenge that was faced towards the end was updating sketch shader files location inside Shader Editor in real-time when the current untitled processing sketch was saved and also store the shader files contents to a temporary location before sketch was saved. A major portion of the solution to this problem involved IPC.
Other minor challenges included finding the most appropriate existing open-source shader editor as a starting point. A lot of research was done to find the right tool at the beginning of the project.
Since Shader Editor is not a complete tool, there is room for a lot of features. Some of these include the following:
support for shader without vertex shader
support for multiple shader files (i.e more than 2)
resolving the naming conflict between uniform shader variables in processing and Shdr
making Shader Editor recognize external uniform variables or passing their value to Shader Editor
Repositories and Commits
The project was started by initially forking the processing-tool-template. Later forked repository was replaced with a downloaded version and more sub project folders were added that included Shdr-master(Shdr source code), processing(source code) app, core and java projects. For the shader testing phase, a project by the name of P3D-test was also added to test processing shaders without compiling and running the PDE repeatedly. All changes were pushed to the master repository GLSL-Editor-Processing on GitHub.
Initially Shader Editor tool was run through terminal for debugging purposes but was later done by calling an executable generated by electron-packager. These executables have been uploaded as binaries inside the Shader Editor tool package in GitHub releases.
Shader Editor Tool
Changes to the source code repository have been tracked as commits.