/** Company: Shout3D LLC Project: Shout3D 2.0 Sample Code Class: InvertSceneEffect Date: March 23, 2000 Description: A simple example of a PostRenderEffect that inverts the colors of the scene. (C) Copyright Shout3D LLC. - 1997-2001 - All rights reserved */ package custom_nodes; import shout3d.core.*; import shout3d.*; import java.awt.Graphics; /** * InvertSceneEffect * * @author Dave Westwood */ public class InvertSceneEffect extends PostRenderEffect { /** * Constructs a default InvertSceneEffect node. */ public InvertSceneEffect() {} public void filter(Graphics offScreenGraphics, int surface_pixel_bits[], float z_buffer[], int deviceWidth, int deviceHeight) { if (surface_pixel_bits == null) return; for (int i=0;i>16)&0xff))<<16) + // invert red ((255-((surface_pixel_bits[i]>>8)&0xff))<<8) + // invert green ((255-((surface_pixel_bits[i])&0xff))); // invert blue } } }