Jota_sk
Jota_sk

Reputation: 169

Light reflects change the material

I have a basic scene with a ground and a unique light. But where the light its the mesh it produce a strange effects. The shadows are casted without any problem, but all the others meshes affected by the light produce a weird effect.

Here is a Online demo.

And here is a screenshoot that what is going on: enter image description here enter image description here

The black square on the ground and the black lights are produced by the light.

Upvotes: 2

Views: 61

Answers (1)

ThreeDeeZero
ThreeDeeZero

Reputation: 86

That artifact looks like what is known as "shadow acne". It is a common problem of shadow mapping. Just a little modification is needed in the shader that takes care of shadow mapping.

You can find a very well written guide on shadow mapping here. Basically there are two solutions explained there:

  1. Render the shadow map using the back faces.
  2. Add a bias to the test that determines if a fragment is occluded.

Of course in order to do this you would need to have access to the fragment shaders.

Upvotes: 1

Related Questions