Quote: There is a limitation for terrain size? Because when the camera if far away from the origin, the paint operation don't work.
The paint operation doesn't work when you move more then 5000 Quants away from the paint target. This limitation is for speed reasons as c_trace (which is used here to locate the hit point of the pencil) is performance consumsing, when increasing the trace line to much.
Quote: I found a bug with the shadows baking, after this operation, when I paint, I can see a kind of square around the brush and textures are darker.
Yes I realised this bug. This is probably because the shadow_map is stored as alpha channel in the blend mapping skin by now, and the pixel_transferfunction may worked incorrect with passing the alphavalues. I'll fix this in the full version.