Hi community.
I came across a problem now which I am struggling to solve.
I have a button image and the image has a white drop shadow with a transparent layer.
I am using the GUI material def and set the Blend setting to Alpha.
Now for some reason which I can’t figure out is that the white drop shadow on android changes to black.
If anybody can help me I will be much obliged.
And I am using jME3.0.
Here is an image of the problem:
nehon
February 18, 2016, 6:54am
2
Maybe a sorting issue?
What is your viewportBackground color on android? Looks like your shadow is blended over grey on android.
Well my viewport background color is set to white and I have nothing else in the scene.
There is only the button picture in the scene from above.
nehon
February 18, 2016, 8:47am
4
What is your glsurface pixel format?
I don’t understand the question…
I use what jME provides.
EDIT: Wait, you mean on the android glsurface view… mmm, I don’t know. What should it be?
nehon
February 18, 2016, 10:48am
6
In the Harness you set Something like TRANSAPRENT, FASTEST or something like that.
If you have TRANSPARENT, you shouldn’t
Hi @nehon .
I am not using transparent but rather BEST.
None of them work.
If I recall correctly one of the most common bugs reported about Android in 3.0 was incorrect alpha channel in textures. It was fixed in 3.1.
Hey, thanks @Momoko_Fan
I will check it out and see if it is fixed or not.
Thanks for the feedback.
I could still not fix this. Does anyone else get this in jME3.0?
Please help?
Don’t understand, do you still see the issue with jME3.1, or you don’t know how to fix it for 3.0?
I am not using jME3.1 and I do not know how to fix it in jME3.0
@Momoko_Fan please assist?
pspeed
February 24, 2016, 9:50pm
13
Probably fix = upgrade to JME 3.1.
Not sure there is another option.
This is for a production build for a company and I cannot use an unstable version of jME.
Thanks @pspeed , but do you have an idea what might be the problem.
Can I not fix the android renderer or where could it be?
pspeed
February 24, 2016, 10:23pm
15
Ok… but note: in the open source world, “stable” is just a label. If I went into git and tagged it as “Stable” it’s arbitrary. 3.1 is at least as stable as 3.0 was. Just different kinds of instability.
I have no idea. I don’t do android development. I think momoko_fan probably gave the best hint already.
As I understand, the entire OpenGL interface was redone for 3.1 so I don’t know what if anything would transfer back to 3.0.
…but is a custom 3.0 fork going to be any better than an ‘unstable’ 3.1 for your customer?
Cool.
Thank you for the answer I will try it on the latest trunk of jME3.1
pspeed
February 24, 2016, 10:31pm
17
At the very least, if it doesn’t work then it will at least eliminate one possible solution.
Might want to look into this:
/*
* Copyright (c) 2009-2020 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of 'jMonkeyEngine' nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
This file has been truncated. show original
It’s a replacement for the image loader on Android which, as the comment states, does not have the RGBA8 bug. I believe it was deprecated because of performance issues.
Thanks @Momoko_Fan .
So just to be clear, this is the fixed version, right?
This has the alpha bug fixed specifically, but unfortunately it has performance issues due to having to process the image data manually.
In jME3.1, the solution was to replace image loading entirely via native code which doesn’t have the performance issues nor the alpha channel bug.