Is it possible to draw on a texture lines, shapes and have a transparency mask like DirectX 2d or Open GL 2d does?

Hello, I want to port my drawing engine to Unity. I have a major drawing app on Windows 10 with over half a million users. The drawing engine is written in DirectX 2D with C++. Basically drawing on a texture. I would love to port it to Unity as I am now a Unity master as well! I am trying to decide between Xamarin or Unity as I am only 1 person and I cannot program for each platform. Xamarin does what I need with Open GL but I would rather use Unity if I can.

Is it possible to draw on a texture lines, rectangles, ellipses and have a transparency mask like DirectX 2d or Open GL 2d does?

Thanks

Well, I’m still not sure what exactly you mean, however a texture can have an alpha channel which can be used to do alpha blending in a shader. It’s usually used for transparency and masking. Unity doesn’t have any “functions” to draw lines, rectangle or ellipse shapes, though OpenGL doesn’t have them either. You have to create/ draw an actual mesh. Of course those can be procedurally generated. Using appropriate shaders, vertex colors, texture coordinates and textures you can do everything you want.

A camera can be rendered into a RenderTexture. You can also use Graphics.Blit and other low level rendering commands to combine textures on top of each other using a specific shader.

If you need further help you have to get much more concrete about what you want to do. Keep in mind that Unity is a game engine. It uses either DirectX or OpenGL for the lowlevel rendering stuff but it’s generally not meant for pure image composition or image editing. However that doesn’t mean you can’t create the next Photoshop in Unity. It’s possible if you invest enough time.