libretro / common-shaders

Collection of commonly used Cg shaders. These shaders are usable by either HLSL and/or Cg runtime compilers. The cg2glsl script will translate most of these into GLSL shaders.
http://www.libretro.com
1.05k stars 250 forks source link

Changes to crt-lottes #64

Closed rz5 closed 8 years ago

rz5 commented 8 years ago

With this, there is only one crt-lottes.cg, capable of halation and 4 types of shadow masks. The two associated presets only differ in that one sets the 'bloomAmount' parameter to zero. Also added the ability to change the filter's kernel through a new parameter called 'shape'.

hizzlekizzle commented 8 years ago

Could you wrap the bloom section(s) in an #ifdef? I know the effect can be visually disabled by setting a parameter but the performance impact will still happen with the branching if. An #ifdef would let people disable it entirely by modifying the file if they need the extra fps, which is the main reason I left the un-bloomed version in the first place.

rz5 commented 8 years ago

Is it enough to wrap the call to Bloom() or should the rest of the bloom-associated functions be wrapped in the #ifdef as well?

hizzlekizzle commented 8 years ago

I think it's enough to wrap Bloom(). It should be easy enough to test, though, since the performance hit is pretty obvious, as I recall. I'll go ahead and merge as-is and we can revisit it if the fps hit is still there.