jme3Image = new AWTLoader().load(new FileInputStream(“C:\temp\jme3_abstract.png”), false);
Texture2D texture2D= new Texture2D(jme3Image);
Geometry geo = new Geometry(“Flattenning”,new Quad(1, 1, false));
Material mat = new Material(assetManager, “Common/MatDefs/Misc/Unshaded.j3md”);
It seems like the result I get is in the pre-multiplied alpha format - but for some reason - the alpha itself is also multiplied by itself. When I take a square root of the alpha and use the result to convert the RGB components to regular RGB (not pre multiplied) I get the correct result.
The alpha channel is stored badly. I can fix it on my side after fetching the data - but I fail to understand what I’m doing wrong or what I’m missing here that I get this result. (assuming that JME3 is working OK)
Ok, then it’s the how the blend mode is setup. JME doesn’t really care what the stored alpha is. If the visuals are right then I guess JME thinks “it’s right”.
Without looking at the code, I guess the blend mode is setup to write SRC * SRC_ALPHA. So all four components will get multiplied by alpha when writing to the buffer. (Edit: or something like that… my blend-mode-fu is rusty.)
Find the BlendMode class. Look at the comments in there that explain exactly what the blend mode setting is. There are online tools you can plug those values into to see the effect (I don’t have the links handy).
…then search through the code to see where BlendMode is used.