}
@Override
public void preRender(SnapshotRender snapshotRender) {
Shader s = snapshotRender.getMaterial().getShader();
float time = (float) ((System.currentTimeMillis() % 15000) / 15000.0);
float rads = (float) (time * TrigMath.TWO_PI);
float x = (float) Math.sin(rads);
float y1 = (float) Math.cos(rads);
float y = (y1 * cY);
float z = (y1 * cZ);
if (force) {
x = xForce;
y = yForce;
z = zForce;
}
s.setUniform("suny", y);
s.setUniform("sunSize", sunSize);
s.setUniform("dawnColor", dawnColor);
s.setUniform("dayColor", dayColor);
s.setUniform("nightColor", nightColor);
}