Page 1 of 1

Referencing ASE Opacity Mask Texture in c#

PostPosted: Mon Sep 10, 2018 2:40 pm
by andyo
Hi,

I'm struggling to find a way to reference the 'Opacity Mask' information generated from my ASE shader. More specifically, I have a basic material that has an Albedo texture and it 'disintegrates using a noise texture and the Opacity Mask. I'm trying to emit particles from the surface but only from the areas that are still visible. So I'm trying to reference a texture in the shader that would combine the Albedo and also the dynamic Opacity Mask as alpha.

I hope this makes sense and any help would be massively appreciated.

Many thanks

A

Re: Referencing ASE Opacity Mask Texture in c#

PostPosted: Mon Sep 10, 2018 4:17 pm
by Ricardo Teixeira
andyo wrote:Hi,

I'm struggling to find a way to reference the 'Opacity Mask' information generated from my ASE shader. More specifically, I have a basic material that has an Albedo texture and it 'disintegrates using a noise texture and the Opacity Mask. I'm trying to emit particles from the surface but only from the areas that are still visible. So I'm trying to reference a texture in the shader that would combine the Albedo and also the dynamic Opacity Mask as alpha.

I hope this makes sense and any help would be massively appreciated.

Many thanks

A


Hello,

I'm afraid you can't reference the alpha directly in that manner, with or without ASE. You could try using Unity's own Graphics.Blit to extract it but I don't recommend going for this if you are not comfortable with the process.

Alternatively, I recommend looking into existing solutions:
Particle Texture
TextEmit

Hope it helps!