How to set transparent textures?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Magnet
Posts: 101
Joined: Wed Sep 27, 2006 7:32 pm

How to set transparent textures?

Post by Magnet »

I have texture, with apha chanel.
How to set it to object?
If i set it with this code:

Code: Select all

	SMaterial mat3;
	mat3.Texture1=driver->getTexture("../storage/Water/texture3.png");
	mat3.Lighting=true;
	mat3.MaterialType=video::EMT_TRANSPARENT_ALPHA_CHANNEL;
texture draws no trasparent.
Last edited by Magnet on Sat Oct 07, 2006 6:00 am, edited 1 time in total.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You have a jeg with alpha channel :shock: That's pretty smart, but Irrlicht supports alpha channels only for other image formats :wink:
Magnet
Posts: 101
Joined: Wed Sep 27, 2006 7:32 pm

Post by Magnet »

excuse me ^-). I am not change extension. But this not solve my problem.
Magnet
Posts: 101
Joined: Wed Sep 27, 2006 7:32 pm

Post by Magnet »

Alpha is loaded. But does not has fluent transition. Pixel on plane only full visible or non visible.

Image

My texture is: http://www.webpolit.com/irr/1.png
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Change the MaterialTypeParm to something very small. This makes it much smoother.
Magnet
Posts: 101
Joined: Wed Sep 27, 2006 7:32 pm

Post by Magnet »

O! Thanks.
But I have noticed that it work with OPENGL but does not work with EDT_DIRECT3D9
It's bug?
Post Reply