More Shader Engine Work
May 2, 2025
Over the past few days I’ve been learning more GLSL and reading through The Book of Shaders. It’s been very helpful and it has a lot of examples of the math and functions you need to be familiar with. There is a lot of info and I’m barely scratching the surface but I do feel like I’m taking in the knowledge.
I’ve been hard at work on my Shader Engine; I figured out how to separate the logic out of the main function, so now I have a Window Class and Shader Class. I’ve also implemented some new features; I now have a way to toggle whether or not the window should stay on top, and if it should go into full screen on launch. However, I haven’t found a way to change these settings during runtime.
I also found it quite annoying that while working on shaders that I had to close and relaunch the program in order to see my changes, so I made a reload function and mapped the R key to it! I also mapped a few keys to load different shader files. Currently there is no way to reload the shader on save though, and with VS Code I don’t have the ability to hot reload the program so this is a great new implementation!
This project is separate from RudeRacoon, but I used one of the earlier commits of RudeRacoon to build it up. With RudeRacoon I was following a tutorial, and The codebase kinda grew faster than I could keep up. With this project I decided to build it on my own, this is great because building it myself helps me be more familiar with how the systems all interact with one another. The separation of logic might not be the cleanest, but I did it without following any tutorials so I’m happy with what I’ve been able to put together so far. It would be great to find someone who could review my code and give me some feedback as well, but I would like to clean up some bits and pieces before I do. I haven’t made a Github repo for this one yet, but I will soon.
What I want to accomplish with the engine.
It would be really cool if I could edit the shader in the engine to some capacity. I was thinking about implementing some RGB Sliders so you can edit the background.
It would also be cool if I could edit the shader script in my engine and I think this is what I want to accomplish.
I would have to figure out how to implement a text editor with a way to edit, load and save files. I could try to make a directory system so you can select files that you want to load. I would also need to implement undo/ redo and a way for the shader to either update while typing or on save.
Blog
Kero Mena