MyGUI / mygui

Fast, flexible and simple GUI.
http://mygui.info/
Other
713 stars 205 forks source link

widget colors are inverted with Ogre 1.13 and DX9 #230

Closed corentinjaffre closed 2 years ago

corentinjaffre commented 2 years ago

According to https://github.com/OGRECave/ogre/blob/master/Docs/13-Notes.md#breaking-non-api-changes:

VET_COLOUR* is now an alias for VET_UBYTE4_NORM. On most RenderSystems VET_COLOUR would be already mapped to VET_UBYTE4_NORM anyway. A notable exception is D3D9, where this changes the channel order from BGRA to RGBA. If you are using custom vertex shaders, you must update them accordingly.

I guess this is why colors are wrong in my app: B and R seems to be inverted.

paroj commented 2 years ago

mygui does not seem to use shaders for D3D9, so things should just work. Do you use something that swaps channels in your code?

corentinjaffre commented 2 years ago

It does afaik: I inverted the channel in the MyGUI_Ogre_VP.hlsl and I did: outColor = inColor.bgra;

paroj commented 2 years ago

indeed.. took me a while to find where it happens