unity3d - Eraser effect in plane using shader -


i trying produce eraser material on plane.

the way thinking of doing passing array shader telling shader material should transparent; if value array 0, return no color material (i.e. tranparent). have 2 problems:

  1. how declare , pass array in cg?

  2. does way work , if so, best way this? thinking might demanding.

just use texture2d "array". can modify @ run-time (using setpixel or setpixels) , pass shader would.

and in shader appropriately manipulate base texture using "erased" texture. manipulate alpha or so.

given you're dealing simple plane, seem straightforward option.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -