/** 1. For POI take a spatial in the constructor and make all calculation against its world pos * - Alternatively compute an arbitrary POI by casting rays from the camera * (one in the center and one for each corner and take the median point) * 2. Take the 4 most weighted probes for default. Maybe allow the user to change this * 3. For the inner influence radius take half of the radius for a start we'll see then how to change this. * */ @Override public void postQueue(RenderQueue rq) { List<BlendFactor> blendFactors = new ArrayList<BlendFactor>(); float sumBlendFactors = computeBlendFactors(blendFactors); //Sort blend factors according to their weight Collections.sort(blendFactors); //normalize blend factors; float normalizer = 1f / sumBlendFactors; for (BlendFactor blendFactor : blendFactors) { blendFactor.ndf *= normalizer; // System.err.println(blendFactor); } //for now just pick the first probe. if(!blendFactors.isEmpty()){ probe = blendFactors.get(0).lightProbe; }else{ probe = null; } }
processor.populateProbe(filteredLightList);