I have created a simple scene in three js (r85). It contains a camera, a light and a plane geometry mesh. I have also created a renderertarget where I render the bumpmap texture of the plane with a ShaderMaterial. In the fragment shader the bump mapping uses a continuous function (so the bump mapping should be "smooth"):
varying vec2 vUV;
void main() {
float x = sin(sqrt(vUV.x * vUV.x + vUV.y * vUV.y));
gl_FragColor.rgb = vec3(x, x, x);
}
The code renders the following image (strange lines):
Some kind of strange lines appears when I use bump mapping with MeshPhongMaterial.
See jsfiddle here.
Can someone tell me what are those strange lines and how to avoid these? If I use a simple image for bump map (not a rendertarget) then the lines do not appear.
Thanks!