Hi Nehon! Thank you for the response! There is no difference for the transparent material, if I set up GlowColor
or remove GlowMap
parameters like this:
Box cube2Mesh = new Box( 1f,1f,0.01f);
Geometry cube2Geo = new Geometry("window frame", cube2Mesh);
Material cube2Mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
cube2Mat.setTexture("ColorMap", assetManager.loadTexture("Textures/ColoredTex/Monkey.png"));
cube2Mat.getAdditionalRenderState().setBlendMode(BlendMode.Alpha); // activate transparency
cube2Mat.setColor("GlowColor",ColorRGBA.Black);
cube2Mat.clearParam("GlowMap");
cube2Geo.setQueueBucket(Bucket.Transparent);
cube2Geo.setMaterial(cube2Mat);
rootNode.attachChild(cube2Geo);
Transparent object is still greenish and there are squares for the ParticleEmitter
. Do I set up GlowColor correctly?
BloomFilter.GlowMode.Scene
produces the same artifacts, just whole scene is blooming.
If to remove BloomFilter
, then everything is ok, But it means, that I can’t use glow for other materials, where required.
If to use custom material definition based on Unshaded.j3md, where GlowMap
, GlowColor
and Technique Glow
are removed, then the artifacts are still present for objects with custom material, when BloomFilter
is used. For some reason BloomFilter
affects transparent objects.
Update: Artifacts show up after adding any filter, not only BloomFilter
.
Update 2: I guess I have found the reason of the problem.
FilterPostProcessor
has such code:
if (!renderer.getCaps().contains(Caps.PackedFloatTexture)) {
fbFormat = Format.RGB8;
}
Radeon HD 4570 reports, that it supports PackedFloatTexture
, so fbFormat
is kept with its default value Format.RGB111110F
. If to force fbFormat = Format.RGB8;
then no artifacts are present.
So, looks like either logic, which sets fbFormat
is incorrect, or drivers don’t support PackedFloatTexture. In any case, it would be nice to have a possibility to set up fbFormat
manually during FilterPostProcessor.initialize
. Unfortunatelly fbFormat
has private access, so it is impossible to change its value in derived classes. Though it is possible to use a workaround: renderer.getCaps().remove(Caps.PackedFloatTexture);