File tree Expand file tree Collapse file tree
jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5757 */
5858public class LightsPunctualExtensionLoader implements ExtensionLoader {
5959 private static final boolean COMPUTE_LIGHT_RANGE = true ;
60- private static final boolean APPLY_POINTLIGHT_DIV4PI = true ;
61- private static final float GLTF_LIGHT_COMPAT_SCALE = 0.002f ;
60+ private static final float GLTF_LIGHT_COMPAT_SCALE = 0.0014f ;
6261
6362 private final HashSet <NodeNeedingLight > pendingNodes = new HashSet <>();
6463 private final HashMap <Integer , Light > lightDefinitions = new HashMap <>();
@@ -189,8 +188,8 @@ private PointLight buildPointLight(JsonObject obj) {
189188 String name = obj .has ("name" ) ? obj .get ("name" ).getAsString () : "" ;
190189
191190 float intensity = obj .has ("intensity" ) ? obj .get ("intensity" ).getAsFloat () : 1.0f ;
192- ColorRGBA color = obj .has ("color" ) ? GltfUtils .getAsColor (obj , "color" ) : new ColorRGBA ( ColorRGBA . White );
193- if ( APPLY_POINTLIGHT_DIV4PI ) intensity /= ( 4.0f * FastMath . PI );
191+ ColorRGBA color = obj .has ("color" ) ? GltfUtils .getAsColor (obj , "color" )
192+ : new ColorRGBA ( ColorRGBA . White );
194193
195194 float scaledIntensity = toCompatIntensity (intensity );
196195
You can’t perform that action at this time.
0 commit comments