> EDIT: Nevermind. Now that I'm not on my laptop out in the sun I see that this is > pretty bad on a calibrated monitor. But I'm still surprised at how far off the > YIQ->RGB formulas are from the standard ones you see everywherw (like wikipedia). > > It's interesting how far off these are from the formulas on the YIQ wikipedia page. > > If you want to try out this effect now (it might be wrong if we need to do some kind > of gamma correction first) you can do the following: > > (1)Get the RGB->YIQ matrix from wikipedia. > (2)Get the YIQ->RGB matrix from your post > > To get the full RGB->YIQ->RGB you multiply the matrices together in the correct order > (YIQ->RGB)*(RGB->YIQ) and use the result in the color convolution section of the hlsl > shader. Either the BGFX version or D3D will work. But you'll need to edit the > hlsl.json to allow negative slider values. > > For example, if I type the matrices into wolframalpha mostly correctly and copy paste > the result, the result is: > > (1.33737 | -0.025411 | -0.311956 > 0.17323 | 0.446306 | 0.380464 > -0.005481 | 0.031327 | 0.974154) > > So > > Red from Red = 1.34 > Red from Green = -0.025 > Red from Blue = -0.0312 > Green from Red = 0.173 > Green from Green = 0.45 > Green from Blue = 0.38 > Blue from Red = -0.005 > Blue from Green = 0.031 > Blue from Blue = 0.97 > > > This would correspond to correctly converted YIQ but then converted back to RGB with > your coefficients (barring typos). It does seem to make, for example, the nes output > closer to my old crt PVM. The sky is much closer in smb1 anyway. But you might need > to play with the gamma settings. And lower saturation if you haven't already. It was > set at 150% by default in the bgfx hlsl chain!
Thanks for all the above, including the effort, it is appreciated. The Sony CXA2025AS US decode matrix is definitely something many NTSC(/US) users experience(d).
Absolutely, off the bat, the sky in SMB1 is one of the first noteworthy items, appearing as a 'true blue', rather than the current default of a very 'purple' colored sky.
Having an option, perhaps a command line switch (I.E. -matrix ntscsony) or some other way to have a preset display default, with the correctly converted and assigned attributes, would go a long way in MAME emulating the hue/color output as witnesses under many systems for a considerable portion of the population.
Hopefully, somewhere down the road we'll see it implemented "officially". Thanks, again
|