2022-04-12 10:08:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Simple shader that just copy the interpolated color to the screen.
|
2022-04-14 20:42:57 +00:00
|
|
|
*
|
2022-04-12 10:08:58 +00:00
|
|
|
* @author: cdehais
|
|
|
|
*/
|
|
|
|
public class SimpleShader extends Shader {
|
|
|
|
|
2022-04-14 20:42:57 +00:00
|
|
|
public SimpleShader(GraphicsWrapper screen) {
|
|
|
|
super(screen);
|
2022-04-12 10:08:58 +00:00
|
|
|
}
|
|
|
|
|
2022-04-14 20:42:57 +00:00
|
|
|
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());
|
2022-04-12 10:08:58 +00:00
|
|
|
}
|
|
|
|
}
|