DefFX - A collection of useful shader effects

Still working on FXAA. Have render target post processing working for 3d rendering now - example with mosaic / pixelate filter. I’m thinking about the best, most user/designer friendly way to allow multiple post processing layers without needing to modify the render script at all or much. @britzl made a good way of handling multiple cameras dynamically which could work with this too.

Something I’ve never tested using yet is the ability to add a list of materials to the .render file.

Idea of method is you have a post processing prefab GO, and you send a message to it with a list of post processing effects you wish to apply and in an order. You must also have a custom .render file which also has the same list of materials with the same names. Then the render script looks at the dynamic list of materials and attempts to use them in the order specified one after another. Then for dev can quickly comment out the shader effect materials from the list to disable them and enable them quickly. For release optimization would probably want to go through the shaders you do use and merge them into a single shader, which is not too difficult to do and a few multi shaders like this could be prepared once we know which ones would be generally used. I believe that Unity’s shaders are done this way. The team (or a tool) makes every possible combination into a single shader with a single one used with the set of options the user selects.

A smart multistep process is also needed for some shader effects such as some of the anti-aliasing methods and blur methods. Versions of PBR need it too.

2 Likes