Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.



This topic is 5921 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have written a kind of sprite system that maintains a list of sprites. When I call its render function each sprite manually transforms its vertices and stuffs them into a global vertexbuffer. This works so far. But how can I apply alpha blending to them sprites? I have tried lighting too but if I switch the light off nothing can be seen (of course) but if I switch it on every one object appears totally lit and the others show no kind of "special effect". But still, how do I apply alpha blending? Im Anfang war die Tat... Faust

Share this post

Link to post
Share on other sites
What API are you using (Direct3D, OpenGL, etc.)? Right now I am working with the ID3DXSprite interface of Direct3D 8.1, and it works great.

In order for a triangle/sprite to show up when lighting is enabled, you must apply a material to the triangle. I haven''t done much with materials or lighting yet, but there are plenty of people on this forum that would know more (plus there are probably a lot of threads discussing materials/lighting/etc.)
If you want, you can just apply lighting by adjusting the RGB values of each of your sprites.

Post what API and language you''re using, and more people will be able to help you better.

Good luck...


Share this post

Link to post
Share on other sites
I am using D3D too but I wrote my own sprite interface.
Well the name sprite is not actually correct because it is a simple mechanism to display quads in 3D space that can easiliy be tranformed at feature texture animation.
So it is just vertices featuring position, normal, diffuse color and texture coordinates.
They are transformed by hand and stuffed into a vertex buffer and then rendered according to texture.

Im Anfang war die Tat...

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!