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

Add simple2x shader #112

Closed gjalsem closed 7 years ago

gjalsem commented 7 years ago

This uses the stock shader to do a simple scale to double size, using nearest neighbor. Using this shader in combination with bilinear filtering gives a nice balance between pixels and smoothness.

hizzlekizzle commented 7 years ago

This can already be done with the sharp-bilinear shader by setting the pre-scale factor to 2, but I'm okay with merging this if you move it into the cgp directory.

gjalsem commented 7 years ago

Ah, I didn't realize sharp-bilinear could already do this. I did try it out, together with other shaders, but I didn't know you could change the pre-scale factor.

So I'd understand if you don't merge this pull request. But if you still want to, I've moved the file to the cgp dir. (I used GitHub's web interface, so I couldn't rebase or anything. But you can squash my different commits on merge, right?)

hizzlekizzle commented 7 years ago

I'll go ahead and merge it because if you didn't know how to do it, we can't really expect anyone else to know how, either :)