In my previous two posts I refered to a library of shaders that I have begun to develop. The idea is for me, and hence all of you, to have a set of flexible, mostly small, utility shaders to do things relatively simple operations such things as blurring and rippling. If you are familar with fragment shaders in GLSL these operations are not hard to write as one-off's for use with a particular scene but you may then want a slightly different version for another scene and so on ad nauseam. This can lead to a plethora of similarly, or even identicaly, named shaders that differ only in small details. The library I am producing is intended to avoid this by providing more general, but basic, operations that can be tailored to specific needs via parameters passed as so called "uniform variables" that can be declared in the iStripper scene files. Within the library, and particularly as far as its user interface is concerned I have used a consistent naming convention so that it is quite clear what is part of the library and which shader a uniform variable is associated with.
As yet there are only a few shaders in the library, but I have plans for quite a few more. Currently the available shaders are
TheEmuLib.Emu_Rectangle.fsh
... ... Modify opacities inside and outside a rectangular area, with either hard or soft edges.
... ... May be used to extract rectangular areas from an image, which can be from a frame buffer.
... ... May be used to implement vignetting.
TheEmuLib.Emu_Ripple_XY.fsh
TheEmuLib.Emu_Ripple_RA.fsh
... ... Cause the image to ripple in either the X and Yor polar (R,A) directions.
... ... The effect can optionaly be confined to a section of the image either by
... ... a discontinuity or by smoothly fading the ripple to zero near the edges.
... ... May be used to cause images to ripple, to pulsate or to undergo more
... ... extreme dynamic distortions.
TheEmuLib.Emu_Ripple_RGBA_XY.fsh
TheEmuLib.Emu_Ripple_RGBA_RA.fsh
... ... Ripples the colour and opacities of an image. Similar to the Riookle_XY
... ... and Ripple_RA shaders but operating in colour space.
... ... May be used to cause waves of colour to pass across an image or to
... ... produce more complex colour variations. May be also used to cause
... ... waves of transparancy allowing a second image to show through.
TheEmuLib.Emu_Clamp_RGBA.fsh
... ... Restricts the ranges of colour and opacitities for pixels in an image.
... ... Originaly written because when using combinations of shaders the
... ... R, G, B and A components could go out of their normal range of 0.0
... ... to 1.0 which could then adversely affect the final image.
... ... May be used to enforce the normal range for colour and opacity,
... ... May be used to restrict the range of colour components, e.g. to fix
... ... the red component to have a value of 0.25 or to limit the opacity.
The scenes in the library are not intended to be interresting in their own right, they were mostly produced to test individual features of the shaders though a few are more demo than test. However, you can use them to see hw to use the shaders and the sorts of things that they can do. Youcan then use the shaders in your own scenes tweaking the control parameters defined by uniform: clauses in your .scn files. You should also, perhaps, look at the ReHa small pool scenes and the Misc Alternate Reality and Reflecting pool scenes (see previous posts) for examples of their use.
The library also contains some of what I regard as my "standard" background and other images.
Everything is described in the various text, .txt, files that you will find in the library. Eventualy I hope to provide a proper manual.
The direct link to the zip file is
http://www.theemusnest.eu/scenes/Zips/TheEmuLib/TheEmuLib%20=%20Library.zip