- Home /
Whiteboard with render texture as canvas mask
I will try to post this again, tried to post before but on login in the post was duplicated, and then i was sent to moderators. So i deleted it and will try again.
I am making a whiteboard, and i am looking for an efficient way to draw on it. So far i been using blit and a shader to draw on a render texture that i placed on the whiteboard. Problem is the render texture is black, and i want it transparent with only the painted areas showing on the board. My idea is to somehow set black as transparent, and if i want to use black as paint, i can just pick the shade right next to it. Is there any established method in unity to make render texture render its default black color as transparent? Is there a better way, should i not use render texture? The reason i use render texture is cause i want to use blit To be clear i am not using a camera for the render texture, i don't want to project anything on it, just draw, but i want the whiteboards base material to show through where render texture is its default black color,I am making a whiteboard, and i am looking for an efficient way to draw on it. So far i been using blit and a shader to draw on a render texture that i placed on the whiteboard. Problem is the render texture is black, and i want it transparent with only the painted areas showing on the board. My idea is to somehow set black as transparent, and if i want to use black as paint, i can just pick the shade right next to it. Is there any established method in unity to make render texture render its default black color as transparent? Is there a better way, should i not use render texure? The reason i use render texture is cause i want to use blit
So my solution is to use blit to write to a render texture, and then use a shader to ignore true black and merge it to the whiteboard material. This seem to work decently
Your answer
![](https://koobas.hobune.stream/wayback/20220613005237im_/https://answers.unity.com/themes/thub/images/avi.jpg)