Brush Shader

I am trying to do something like paint program. There will be a background texture and a brush texture. I will pass the mouse input from the script to the shader and put the brush texture to the proper position of the main texture. How can I achieve this by using a shader because the performance is too low when I do it in the CPU.

Thanks in advance.

I’m trying to do a similar thing but no chance… I tried setpixels method first with no luck and then find “soft brush” ( you can find if you search it) but that guy hasn’t given any code…So yeah, If anyone has any idea please share…

Like this?

Anything you do is going to end up being a combination of shaders and game code. I used a texture as a mask against SetPixels on one of two “control maps” that are used to blend 8 textures in a shader.

yes something like that without the heightmap thing. This might work for my case. Can you give a little more detail and maybe some piece of code?

Edit: I will implement it for mobile. Can I do masking for mobile?

My target isn’t mobile so I don’t know how well it would perform in such an environment. It’s also a fairly complicated solution

Essentially, here are the steps.

Thanks for the reply and sorry for my ignorance… I couldn’t understand the part about the “control maps”. Is there anywhere that i can find information about control maps? Or can you tell a little about control maps like what are they used for?