Hi all,
My particles arent blending properly with the background fog, where the particles arent in the fog ( or when i turn the fog off )they are ok.
http://img2.freeimagehosting.net/image.php?266492d5c1.jpg
for the particles i use the standard snow from renParticleEditor
here is my setup
private void buildFog()
{
fs = display.getRenderer().createFogState();
fs.setDensity(0.2f);
fs.setColor(new ColorRGBA(0.5f, 0.5f, 0.7f, 0.4f));
fs.setEnd(1000);
fs.setStart(300);
fs.setEnabled(true);
fs.setDensityFunction(FogState.DF_LINEAR);
fs.setApplyFunction(FogState.AF_PER_VERTEX);
rootNode.setRenderState(fs);
rootNode.updateRenderState();
}
private void buildSnow()
{
snowNode = new Node("snow node");
try
{
Spatial snow = (Spatial) BinaryImporter.getInstance().load(
Thread.currentThread().getContextClassLoader()
.getResourceAsStream("effects/snow.jme"));
snowNode.attachChild(snow);
ZBufferState zbuf = DisplaySystem.getDisplaySystem().getRenderer()
.createZBufferState();
zbuf.setWritable(false);
snowNode.setRenderState(zbuf);
snowNode.updateRenderState();
rootNode.attachChild(snowNode);
}
catch (IOException ex)
{
ex.printStackTrace();
}
}
i also render the rootNode in the opaque que and im using baseGame.
what am i missing here ?