projet-rendu/SimpleShader.java
2022-04-14 22:42:57 +02:00

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());
}
}