19 lines
498 B
Java
19 lines
498 B
Java
|
|
/**
|
|
* Simple shader that just copy the interpolated color to the screen.
|
|
*
|
|
* @author: cdehais
|
|
*/
|
|
public class SimpleShader extends Shader {
|
|
|
|
public SimpleShader(GraphicsWrapper screen) {
|
|
super(screen);
|
|
}
|
|
|
|
public void shade(Fragment fragment) {
|
|
// System.out.println (fragment.getX () + "," + fragment.getY ());
|
|
// System.out.println ("color " + fragment.getColor ());
|
|
screen.setPixel(fragment.getX(), fragment.getY(), fragment.getColor());
|
|
}
|
|
}
|