Jump to content

Ultra Engine Shader System


klepto2
 Share

Recommended Posts

I have 2 ideas for making the Shader and postprocess pipeline a bit more flexible and to keep the innerarchitecture mostly untouched:

Postprocessing:

  1. Add a method (preferable static, to let later plugins or  where you can assign a named Texture, something like:
    1. PostEffect::RegisterTexture("MyCustomTex");
    2. PostEffect::SetTexture("MyCustomTex", mytexture);
    3. 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.

 

  • Like 1
  • Thanks 1
  • Upvote 1
  • Intel® Core™ i7-8550U @ 1.80 Ghz 
  • 16GB RAM 
  • INTEL UHD Graphics 620
  • Windows 10 Pro 64-Bit-Version
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...