@@ -0,0 +1,1096 @@
+/**%0A * %0A */%0Apackage ca.eandb.jmist.framework.shader.image;%0A%0Aimport ca.eandb.jmist.framework.ImageShader;%0Aimport ca.eandb.jmist.framework.Texture2;%0Aimport ca.eandb.jmist.framework.color.Color;%0Aimport ca.eandb.jmist.framework.color.WavelengthPacket;%0Aimport ca.eandb.jmist.math.Point2;%0A%0A/**%0A * An %3Ccode%3EImageShader%3C/code%3E that adapts a %3Ccode%3ETexture2%3C/code%3E.%0A * @author Brad Kimmel%0A */%0Apublic final class Texture2ImageShader implements ImageShader %7B%0A%09%0A%09/** Serialization version ID. */%0A%09private static final long serialVersionUID = -5238069418249067354L;%0A%09%0A%09/** The %3Ccode%3ETexture2%3C/code%3E to adapt. */%0A%09private final Texture2 texture;%0A%09%0A%09/**%0A%09 * Creates a new %3Ccode%3ETexture2ImageShader%3C/code%3E.%0A%09 * @param texture The %3Ccode%3ETexture2%3C/code%3E to adapt.%0A%09 */%0A%09public Texture2ImageShader(Texture2 texture) %7B%0A%09%09this.texture = texture;%0A%09%7D%0A%0A%09/* (non-Javadoc)%0A%09 * @see ca.eandb.jmist.framework.ImageShader#shadeAt(ca.eandb.jmist.math.Point2, ca.eandb.jmist.framework.color.WavelengthPacket)%0A%09 */%0A%09@Override%0A%09public Color shadeAt(Point2 p, WavelengthPacket lambda) %7B%0A%09%09return texture.evaluate(p, lambda);%0A%09%7D%0A%0A%7D%0A

Add Texture2ImageShader -- an ImageShader that adapts a Texture2.