dev.gamez.lv Forum Index dev.gamez.lv
Latvian Game Developers Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 

textuurai bez alpha piesaistiit melnbaltu textuuru kaa alphu

 
dev.gamez.lv Forum Index -> Microsoft DirectX
View previous topic :: View next topic  
Author Message
snake5
Indago dalībnieks
Indago dalībnieks


Joined: 27 Jun 2007
Posts: 2590

PostPosted: Tue Sep 11, 2007 9:06 pm    Post subject: textuurai bez alpha piesaistiit melnbaltu textuuru kaa alphu

kaa izdariit to, kas virsrakstaa mineets?
_________________
"There are two choices here: "looks good" and "realism"." -- Paul Nettle
Back to top
View user's profile Visit poster's website
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Tue Sep 11, 2007 9:11 pm    Post subject:

Atmiņā tekstūras pikseļi glabājas kā baiti - ARGB ARGB ARGB (vai ABGR ABGR ABGR).
Atliek uztaisīt for ciklu un sarakstīt tās tavas alfas kā vien tu vēlies.


Last edited by bubu on Tue Sep 11, 2007 10:26 pm; edited 1 time in total
Back to top
View user's profile Send e-mail
snake5
Indago dalībnieks
Indago dalībnieks


Joined: 27 Jun 2007
Posts: 2590

PostPosted: Tue Sep 11, 2007 9:50 pm    Post subject:

aa! bet vai tad nav vienkaarshaakas funkcijas prieks alphas pielikshanas?
_________________
"There are two choices here: "looks good" and "realism"." -- Paul Nettle
Back to top
View user's profile Visit poster's website
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Tue Sep 11, 2007 10:24 pm    Post subject:

Es atvainojos, bet kas var būt vienkāršāks par parastu ciklu?
Code:
for (size_t i=0; i<width*height; ++i)
{
    target_image[i] = source_image[i] | (alpha_image[i] << 24);
}
Back to top
View user's profile Send e-mail
snake5
Indago dalībnieks
Indago dalībnieks


Joined: 27 Jun 2007
Posts: 2590

PostPosted: Wed Sep 12, 2007 1:54 pm    Post subject:

aa, nu es domaaju, ka ir kaada d3d funkcija, kura tekstuurai alpha panjem no kaadas citas.. bet ar sho pietiks..
_________________
"There are two choices here: "looks good" and "realism"." -- Paul Nettle
Back to top
View user's profile Visit poster's website
Display posts from previous:   
dev.gamez.lv Forum Index -> Microsoft DirectX All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group