You are browsing as a guest. Sign up (or log in) to start making projects!

3h 56m 30s logged

too many post proc fx?

followup to the post processing / shader experiments…

changes

shader includes

shaders can #include "rand.glsl" etc and it resolves properly. it checks the project VFS first, then falls back to the engine’s own shader helper directory if it isn’t found there.

engine shader helpers also get packaged into exported games under engine/shaders/, so includes keep working at runtime.

added a few helper include files:

  • rand.glsl / auto_rand.glsl - seeded hash-based random, with auto_rand reseeding per frame from u_Time
  • color.glsl - HSV conversion, lift/gamma/gain, contrast, saturation, and three-way color wheels
  • commons.glsl - engine-provided uniform declarations so you don’t have to redeclareu_Resolution, etc. in every shader for engine-provided uniforms

the helpers use #ifndef / #define guards, so auto_rand.glsl can include rand.glsl without causing double declarations if the effect shader or another include declare the same uniforms or includes.

more built-in effects

added a few more built-in post processing effects:

  • ColorGrading - exposure, contrast + pivot, saturation, lift/gamma/gain, and shadow/midtone/highlight color wheels using color.glsl
  • FilmGrain - chunky per-cell grain with u_GrainSize controlling the cell size
  • Vingette - yes i know its mispelled.

uniforms with Wheel in the name now get the wheel-style color picker instead of the regular color picker, since a normal RGB slider

cleaned up effect registration

used to have two separate lists, one for raw shader registration and one for the default effect chain. this meant adding an effect involved touching two different structs in two different places.

merged those into one PPRegistration list with an inDefaultChain flag

shader debug name

added an actual m_DebugName field and made error messages / the material inspector fall back to it when there isn’t a real file path.

docs

wrote up some post-processing editor docs ….. i hate writing docs..

also

  • .shader is now a valid extension for importing custom effect shaders, alongside .frag / .glsl
  • trimmed down the miniaudio CMake config by disabling its examples, tests, and tools, along with Vorbis/Opus/FLAC support since i’m not using any of that….
0
31

Comments 0

No comments yet. Be the first!