Skip to content

Commit d08eab1

Browse files
committed
tweaks
1 parent d1569d3 commit d08eab1

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/LightsPunctualExtensionLoader.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@
5757
*/
5858
public 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

0 commit comments

Comments
 (0)