For this week it was more than anything to polish the materials that were already in the project.
For the toon shader, it was to fix the problem that the border always kept the same thickness regardless of the distance from the camera (player view) so that's what I focused on this week.
The scene depth outputs the depth, or distance from the camera. This is a black and white, 0 and 1 map.
To get the new thickness based on the camera distance for a given depth will output the corresponding thickness, I followed this example of Evans Bohl in which he uses a linear function (ax + b) to get this value.
The only issue is that now there are times that a white border appears on the object if the depth value is to close to another object, but for now it works.
No hay comentarios:
Publicar un comentario