Skip to main content

Stop text in postRender being effect by color of LinearFog

No replies
skinhat
Offline
Joined: 2009-02-26

I'm using Canvas3D postRender to draw text to the screen. For example:

public void postRender() {
getGraphics2D().setPaint(Color.white);
getGraphics2D().drawString("Shattered World", 30, 30);

getGraphics2D().flush(true);
}

and it will come out something like:

http://skinhat.com/shatteredworld/fogwithout.jpg

I have a problem where if a scene has LinearFog then the color of the text is effected by the color of the fog. For example:

http://skinhat.com/shatteredworld/fogwith.jpg

Is there a way to draw text to the screen in postRender without it being effected by fog color?