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
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 ?
(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
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
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
Try to place the cmykLUT.cg as a second shader and have image adjust.cg from misc as the first shader, and save it as a .cgp file and edit the .cgp file and make sure both gamma modes match the numbers and make luminance go down to 0.99 or 0.98. Reload the .cgp file and it should be fixed. It happens to some graphic cards or internal ones, that when red, green, or blue Channel’s goes all the way to 255, it goes back to 0, showing graphical glitches. It’s best to have the maximum to 254, somewhat like how VBA-M displays the screen. D3d is always worse, and takes a longer load time for the shader with LUT texture loaded to Retroarch.
Pokefan531 is right, I would add that actually you can have perceptually different results depending on which pass the shader happens. I’ve found this by trying to use a scanline shader with it, as there is a lot of black generated the result was ‘annoying’ rather than acceptable so the order is vital to get a good result.
Regarding your B/W issue, it should not happen, I don’t know why you’re getting this.
What you can try is to get the cmykPureBlack shader instead, that I’ve put in update 2 on top of this post; there is
const float bwTolerance = 0.0;
than you can eventually try to change. What this shader does it is whenever a pixel color is pure B/W it will not use the CMYK LUT but just return the pixel as-is.
However you shouldn’t get such issues with the ‘classic’ cmyk.cg, you would get a slightly washed out black and a CMYK color space of course but that’s it.
I’ll take a look whenever I can make that D3D device work !
The glitch also affects pure red, green, and blue channels at 255, meaning the maximum red will also turn black. The glitch on certain GPU has to do with memory inefficiency. The only best vram for this shader is from 1gb, as tested on my GPU.
Edit: I just updated my shader, come check it if you like.