Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Simple Blendmapping

Author
Message
Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 27th Dec 2010 01:00
I'm working on programming an engine and I'm testing blendmaps. How would I go about putting texture B over texture A where texture A would show through the alpha in texture B but texture B still has its diffuse texture?

My computer surpasses all the technologies of the day. What computer do I have?

thenerd
17
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 27th Dec 2010 01:47 Edited at: 27th Dec 2010 02:36
So, like this?



In that case, the correct mode to use would be D3DTOP_BLENDTEXTUREALPHA,
You'd use this code to set that up:



Hope that helps!

Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 27th Dec 2010 02:51
Exactly like that, thanks.
I tried just about every other blend mode other than 13 and of course it ended up being 13.

My computer surpasses all the technologies of the day. What computer do I have?

BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 27th Dec 2010 03:24 Edited at: 27th Dec 2010 03:26
@thenerd - nice example, I always wanted to try texture blending - Thanks!
Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 27th Dec 2010 05:24
Here's what I came up with as a test.

My computer surpasses all the technologies of the day. What computer do I have?

Login to post a reply

Server time is: 2026-07-21 20:34:56
Your offset time is: 2026-07-21 20:34:56