x


Transparency showing as black - textures and images loaded using www

Hi,

I am using the WWW class to load some .png images as textures, which I then apply to programmatically generated meshes. I am setting the texture of the mesh using the game object's MeshRenderer, and I know this is working to a point as the mesh displays the texture, just with transparency as black:

gameObject.GetComponent.<MeshRenderer>().material.mainTexture = texture;

I have a feeling the problem has something to do with the way I'm setting the material up, but I don't know what it is I might be doing wrong.

Any pointers as to why transparency isn't displaying properly would be appreciated.

Thanks,

Wibbs

more ▼

asked Mar 16 '11 at 01:28 PM

Wibbs 1 gravatar image

Wibbs 1
331 5 6 18

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Maybe it's because you have a standard shader apllied?
You could try to use a simple Transparent/Diffuse shader as the default shader for your object.

more ▼

answered Mar 16 '11 at 01:42 PM

efge gravatar image

efge
5.1k 5 14 38

Thanks for the quick reply - it worked :) Never even thought of shaders affecting it

Mar 16 '11 at 01:49 PM Wibbs 1
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x525
x354
x245

asked: Mar 16 '11 at 01:28 PM

Seen: 1055 times

Last Updated: Mar 16 '11 at 01:28 PM