klepto2 Posted January 3, 2023 Share Posted January 3, 2023 I have 2 ideas for making the Shader and postprocess pipeline a bit more flexible and to keep the innerarchitecture mostly untouched: Postprocessing: Add a method (preferable static, to let later plugins or where you can assign a named Texture, something like: PostEffect::RegisterTexture("MyCustomTex"); PostEffect::SetTexture("MyCustomTex", mytexture); in the json file you can now access them like depth, etc. Just the binding code might be a bit adjusted on your end. Generel shaders: The current shader system is super fast because you more or less make everything available to every shader. With this in mind, i thought about something like the precompiler for components, but on the fly. with libs like shaderc or glslang it is possible to compile shaders to SPIR-V on the fly in the code. Add something like Shader::AddBufferData("BufferName", "Layout",size, &object); With this we could modify e.G.: UniformBlocks.glsl and add the new buffer data to the pipeline On start when the first shader is about to be loaded the UniformBlocks.glsl is validated against the possible current one. If the validation is succesfull, just use the latest shaders and go on if the UniformBlocks.glsl is different from the new generated one: rebuild all shaders like you already do with the batch file. This would make the system a bit more flexible for additions, but will also maintain the speed you get from less binding switches. 1 1 1 Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
Josh Posted January 3, 2023 Share Posted January 3, 2023 Moved here so I don't lose track of this... Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.