InkPainter icon indicating copy to clipboard operation
InkPainter copied to clipboard

Samples don't work on unity 2022.3.16 with URP

Open Antoshidza opened this issue 1 year ago • 3 comments

My first attempt was to try import package into project with URP, but when I try to paint in Sample01-Paint- scene it just blurs a bit and doesn't change color. When I use legacy unity renderer all works fine. I wonder why this is so because I believe in the end package just gets UVs of pointed object and then paint a texture.

Antoshidza avatar Feb 20 '24 13:02 Antoshidza

I am also facing this issue. Please can anyone give solution.

ranoliyagaurang avatar Oct 28 '24 12:10 ranoliyagaurang

In the InkCanvas.cs script, change the relevant part in the PaintUVDirect() function as follows:

if (mainPaintConditions) { var mainPaintTextureBuffer = RenderTexture.GetTemporary(p.paintMainTexture.width, p.paintMainTexture.height, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear); SetPaintMainData(brush, uv); Graphics.Blit(p.paintMainTexture, mainPaintTextureBuffer, paintMainMaterial); Graphics.Blit(mainPaintTextureBuffer, p.paintMainTexture); p.material.SetTexture("_BaseMap", p.paintMainTexture); RenderTexture.ReleaseTemporary(mainPaintTextureBuffer); }

OyunErbabi avatar Jan 24 '25 12:01 OyunErbabi

is there a solution to the height paint texture?

Lint111 avatar Mar 26 '25 10:03 Lint111