Package org.spout.api.render.shader

Examples of org.spout.api.render.shader.Shader


  }

  @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);
  }
View Full Code Here

TOP

Related Classes of org.spout.api.render.shader.Shader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.