CMYK shader

Got a chance to test your latest cmyk shader and it works perfectly :slight_smile: Really captures the look of promo screenshots from video game magazines!

Using that bgrLUT you uploaded, I used Photoshop’s indexed color mode with a 64-color NES palette I found online and it worked beautifully: So, while your shader obviously serves its intended purpose, it also has use as a general indexed color shader. All one needs to do is take the bgrLUT and convert it to their indexed palette using an *.act color palette file.

I tried your flickering scanlines shader, as well. It works great here, and it looks like it functions very similarly to the interlacing shader I wrote (misc/interlacing.cg in the common shaders repo) :slight_smile:

That last blur shader looks nice and bloomy. Good luck getting it performant enough for general usage.

I have to say that I am rediscovering some of my games using CMYK :wink:

Your experiment looks good, makes me think that RetroArch is missing the EGA shader from DOSBox :smiley:

I think I’ve missed something in the process, my current setup (RetroArch-v1.0.0.2-64-bit.zip) doesn’t have it, neither the archives below:

RetroArch-20140105-Win32-MegaPack.zip
RetroArch-20140105-Win64-MegaPack.zip
RetroArch-v1.0.0.2-32bit.zip

Where is it ?

Regarding the surface blur, I think I’ll have to manually put the coefficients, currently mine uses a for…loop and while it is flexible it’s probably what kills performance, I’ll take a look !

There’s a github repo with a bunch of Cg shaders: https://github.com/libretro/common-shaders They should probably be included in the megapacks in future versions…

Okay, I’ll take a look, thanks !

Hey thanks for making this. I couldn’t open this shader with .jpg, but it worked when I convert it to .PNG without compression. I was experimenting with the texture because I wanted to do a color correction for one of my shaders that needs a different red, green, and blue chroma color. It worked very well when I tested it. I have a question, is it possible to have the texture with lower resolution? Anyway, the shader looks good.

I have started working on another version that uses a smaller (and different) texture but it’s not working for the moment :

[attachment=1:un552sv3]RetroArch-1003-174837.png[/attachment:un552sv3]

[attachment=0:un552sv3]HSL_LUT_CMYK.png[/attachment:un552sv3]

I guess I had to switch to HSL for having a smaller texture but as you can see it is not working, not yet sure if it will even work.

Regarding the resize, not sure, I have quickly tried rescaling the image in a editing software but it doesn’t seem good, it’s related to how the image is. As you can see there are blocks of hues which are of a certain height and when you down size, interpolation wouldn’t even help since it’s really different. I’ll see whether if I regenerate the bitmap from the source at a smaller scale will fix the issue.

For JPEG it’s weird because I’ve read that a build ‘might’ support PNG but I don’t know for JPEG. I was about to deliver the LUT in PNG but since it’s 64Mb I’ve decided not to. I do have one optimized with OptiPng at 13 Mb, I might put it later; thing is that the JPEG is barely different than the original one so I favored the download size for the time being.

I’ll try to take a look over the weekend :smiley:

Yeah, I had to convert to png, as well, but I figured you were using jpg instead for bandwidth consideration.

I guess you are Linux users, right ? :smiley:

(I’ll update the package with a PNG texture next time !)

Pokefan531:

Unfortunately a smaller texture doesn’t seem to work, I’ve tried to regenerate a 512*512 texture and update the shader :

I think it comes from the subtleties of the CMYK color space, if you look at the LUT closely, you will see darker tones between lighter tones and generating a smaller removes them … while on RGB it’s not much of a problem since you can safely interpolate, it’s not the case for CMYK. (someone correct me if I’m wrong)

left is 512px. right is 4096px

last hope might be the HSL approach I’ve explained … we’ll see

hunterk

I’ve been able to find a setting for the surface blur shader :

there are a few issues though,

  • small sections of white such as below Guy’s hand becomes black, that’s inherent to the algorithm
  • the shader runs too slowly when scaled, not sure if this is an issue unless a shader in a previous stage might enhance the input
  • the best results I’ve got are by mixing it with a bit from the original source

there seems to be an O(1) equivalent algorithm and apparently it would fix issue #1, will have to try that one !

This seems likely to me. Pretty sure all interpolation will happen in the RGB space, which pretty much negates what you’re trying to do.

For the blur, you can try forcing a smaller size using an initial pass at 2x or whatever and then scaling it up after that, but it will negatively affect the quality of the blur. What algo is it using? Gaussian? If so, you might be able to utilize some of TroggleMonkey’s extensive collection of blurs (in the common shaders repo, under the ‘blurs’ subdirectory).

After looking again at all these files, my conclusion is that it will never work for CMYK and the current LUT layout, it’s just not doable unless another layout is adopted.

Actually a surface blur is just a gaussian blur with an additional distance normalization factor which enhances the edges. I’ll take a look at the shaders you’ve mentioned !

Have you tried the Technicolor shaders I’ve uploaded ? on some games they really look cool even though it is cheap at times :lol:

That’s fine. At least you are trying. It looks like you are close to finishing the HSL texture, just the white is gray for now. Also for the log from Retroarch, it said unable to find texture when it tries to load .jpg. I had to save it as .png from photoshop without compression because it takes a long time to compress and it may not load very well. I’m running with gts 450 1gb and it loads the texture pretty well.

Edit: Do you have a pure PNG version of BgrLut or a CMYK Lut without converting from .jpg? With .jpg, it messes with the palettes a little bit due to loosy compression, and looking things at gray scale gives weird bands of light pink and light blue. The colors also looked out of color when I used BgrLut to Retroarch, seeing objects have a slightly different hue. Also, I think 512mb is okay to use for Lut texture, but only works on VBA-M when I tested it on my laptop. It might be my laptop, and I don’t know if anyone else has that problem with a 512mb GPU, or from a laptop. The workaround was to have the image adjustment first and have luminance to 0.99 to avoid invisible whites. I was testing for my GBA color shader that I’m working on.

Hi,

I’ve added PNG LUTs to the repository.

Sorry for the late answering but I never receive notifications by email, do you know why ?

The forum doesn’t do that for some reason. I will take a look for the PNG files soon.

Edit: I used the .PNG and the color banding is fixed. I get a solid gray scale, and better quality.

Ah yes, great.

Have you made any progress on your shader ? would like to try it :smiley:

I was doing my GBA shader and improve the color correction from photo shop to replicate the GBA color mode from VBA-M. I did the same for the NDS shader based on the system, and I plan to add the second version for the lut texture later this week. I could only do it by texture since I don’t know how to do codes that the people for VBA-M had implemented, and that’s why I decide to do the texture.

I found out that the VBA-M core slightly darken the white and the VBA next just leaves the white as 255, and it caused color problems with pure white on either opengl or d3d when testing my laptop. Because of how the VBA-M is a little darker, it was fine. Besides that, the lut texture is fine seeing color correction.

This shader doesn’t load on HD6xxx for me in GL, it does in Direct3D and all the colors are funky (tested Kirby Superstar in bsnes core). Latest shader.

I do really like the attempt to approach the paper colors look though, shocked no one’s done that earlier ever. Then again no one thought of making a 3dfx shader till I did :stuck_out_tongue:

Eventually i’ll want to try 3d games with this, inspired by this cover

To fix the error, edit the .cgp file and change cmykLUT.jpg to cmykLUT.png because it has issues loading JPEG files.

Well, while working directly with an emu is quite rewarding, it’s a lot of work … being able to accomplish things through shaders is a great thing IMO.

Not sure why, actually sometimes you can get wrong colors and loading another preset then the reloading the CMYK preset fixes it. As a side-effect I’m not able to try many of the preset as the GUI complains of shader features unavailable for the current CG profile =(

I’d gladly take a look at the D3D issues if you can explain how to get it working, for me it crashes as soon as I launch the GUI. (RetroArch-v1.0.0.2-64-bit)

It seems that the latest commits fixes this but I couldn’t get the source to compile …

I’m using 1.0.0.2-2014-10-10.

Also really bright colors get malformed into black. See: off vs on

Kirby Superstar also shows a difference between GL and D3D drivers with this shader