user3408357
user3408357

Reputation: 61

libGDX 3d: too many PointLight()s?

I found out that you can only have 5 PointLight()s in a environment as dictated by the DefaultShaderProvider, how would I go about changing that? the issue is depicted here which I'm unaware as to how to do:

https://code.google.com/p/libgdx/issues/detail?id=1494

or is there a better way to create lights that I'm not aware of?

Upvotes: 3

Views: 291

Answers (1)

noone
noone

Reputation: 19776

You should be able to create your own default shader config.

DefaultShader.Config config = new Config();
config.numDirectionalLights = 1;
config.numPointLights = 0;
config.numSpotLights = 0;

ShaderProvider shaderProvider = new DefaultShaderProvider(config);
modelBatch = new ModelBatch(shaderProvider);

Upvotes: 3

Related Questions