-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Issue][drawicons][shadows] No sRGB support #16
Comments
I have never played with sRGB, so I dont really know what it takes to turn an image from standard RGB to sRGB, have you got some info? I'll try to look it up, currently the shadows are generated with an SVG file with inkscape and it is pretty customizable, I'll try to find a way to save it in sRGB. |
I'll try to find something like that (Maybe GIMP?) If I can find it, I will make it a separate patch, I'll leave the option to the user, I cannot add it directly to the patch because that depends on the final game. If you change from RGB to sRGB and then back to RGB the patch would need to reload every time, if I load all the images then that is quite much, so it will depend on the final user whether to load the RGB patch or the sRGB |
Nobody changes to/from sRGB after the initial window creation, so there's really not much need to worry about reloading. |
Anyway I need to provide both, so doing it separately is not bad either, just change Is that fine? |
I see the problem. For the images of the shadows, they are not loaded as sRGB images, and they weren't saved as such either. For all the other stuff, gamacorrect rendering is not taken into account by the color.lua library which in turn is used by drawicons.lua which is what you use to draw the icons in place This are easily fix, but I want support on saving the shadows as sRGB images, currently I'm using inkscape, I can give you the .svg if needed. The other stuff I can fix them tonight most provably EDIT: The fab.lua library introduced in the last commit also has problem with sRGB This shadows should be generated again with sRGB support but I've no idea how to do this as stated above |
This is the first time for me to set t.gammacorrect to true, I had fixed the drawicon problem by using love.math.linearToGamma() on the alpha value of the color. For the shadow image thing, In gimp, there is a check box in the png export menu called save gamma, this may solve the problem, give me the svg file to give it a try. |
Didn't intend to close, Github interpreted a commit message as this being a fix, it's a start, two commits to go. shadow.lua should already be fixed |
Well that should do it! Please check it out and report back if you find any other issues. PS: If this doesn't actually fix it feel free to reopen the issue |
I poked at the demo and it didn't need too much to get most things working. The shadows didn't quite want to behave, might need an alternate version of the images for sRGB?
Gamma correct blending makes fonts look significantly better, for what it's worth.
The text was updated successfully, but these errors were encountered: