Reputation: 6870
I am going through tutorials on the net trying to learn libgdx (so far I am amazed at how powerful it is) and I am trying to figure out how I can make the shadows render with soft edges, they are blocky, especially noticeable with multiple lightsources that overlap. The picture below demonstrates what I mean.
This is with high raycounts
new PointLight(handler, 5000, Color.GREEN, 80, width, height);
new PointLight(handler, 5000, new Color(0.2f, 0.3f, 0.4f, 1), 200,
width / 2, height / 2);
new ConeLight(handler, 5000, new Color(0.9f, 0.2f, 0.3f, 1), 200,
width / 2, height, 0, 117);
and cfg.useGL20 = true;
Upvotes: 0
Views: 449
Reputation: 132
I had the same problem, searched on google and found this. So I'll just answer it. The trick is to overload default RayHandler fbo size:
From:
handler = new RayHandler(world);
To:
handler = new RayHandler(world, width, height);
Upvotes: 1