public AmbientOcclusionGIEngine(Options options) {
   bright = options.getColor("gi.ambocc.bright", Color.WHITE);
   dark = options.getColor("gi.ambocc.dark", Color.BLACK);
   samples = options.getInt("gi.ambocc.samples", 32);
   maxDist = options.getFloat("gi.ambocc.maxdist", 0);
   maxDist = (maxDist <= 0) ? Float.POSITIVE_INFINITY : maxDist;
 }
Exemplo n.º 2
0
 public static final GIEngine create(Options options) {
   String type = options.getString("gi.engine", null);
   if (type == null || type.equals("null") || type.equals("none")) return null;
   else if (type.equals("ambocc")) return new AmbientOcclusionGIEngine(options);
   else if (type.equals("fake")) return new FakeGIEngine(options);
   else if (type.equals("igi")) return new InstantGI(options);
   else if (type.equals("irr-cache")) return new IrradianceCacheGIEngine(options);
   else if (type.equals("path")) return new PathTracingGIEngine(options);
   else {
     UI.printWarning(Module.LIGHT, "Unrecognized GI engine type \"%s\" - ignoring", type);
     return null;
   }
 }