Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int red = (int) (pixelcolor.getRed()*(1-(clamp(distance_from_lightsource/light.Range,0.0f,1.0f))));
- int green = (int) (pixelcolor.getGreen()*(1-(clamp(distance_from_lightsource/light.Range,0.0f,1.0f))));
- int blue = (int) (pixelcolor.getBlue()*(1-(clamp(distance_from_lightsource/light.Range,0.0f,1.0f))));
- g.setColor(new Color(red,green,blue));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement