projet-rendu/SimpleShader.java
2022-04-12 12:08:58 +02:00

22 lines
538 B
Java

import algebra.*;
import java.awt.*;
/**
* 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 ());
}
}