Sprite3D Lighting...

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Sprite3D Lighting...

Post by Shannara »

Well, from what I can tell, a Sprite3D is basically a pointer to a texture created from the given 2D sprite. If this is so, then how can we access the sprite3D in order to change the colors of the corners of that texture?

Unless this is already implimented. This would make an excellent wish so that we can emulate lights and such. After all, we already have the texture pointer, we just need to be able to color the vertices.
BalrogSoft
Enthusiast
Enthusiast
Posts: 203
Joined: Sat Apr 26, 2003 6:33 pm
Location: Spain
Contact:

Post by BalrogSoft »

Hi Shannara, yes it is possible, i used Direct3D for some sprites commands on my language and i made a command called SetD3DColor that set the color for each corner, there are some topics on this forums with tips to made it on PB. Take a look to TransformSprite3D routines of Danilo:

viewtopic.php?t=8938
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

That looks nifty :) I'll have to take a closer look at home, thanks!
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

Im bumping this as a request since the link provided links to broken code.
Post Reply