Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
0 registered members (), 635 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Simulate alpha channel? [Re: RyuMaster] #226707
09/10/08 20:34
09/10/08 20:34
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Originally Posted By: RyuMaster

"Cannot implicitly convert from float3 to float4. reutn color"

Srr my bad ^^
Replace:
Code:
 
float3 color = tex2D(ColorMapSampler, InTex);

with:
Code:
 
float4 color = tex2D(ColorMapSampler, InTex).rgba;


Report back and let me know if it worked wink wink

Thanks in progress

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: Simulate alpha channel? [Re: frazzle] #226848
09/11/08 17:55
09/11/08 17:55
Joined: Aug 2006
Posts: 155
R
RyuMaster Offline OP
Member
RyuMaster  Offline OP
Member
R

Joined: Aug 2006
Posts: 155
Yep, it worked! But it does... nothing 0_0 All looks exactly the same way as without it 0_0 What changes should I expect?


What kills me not, that makes me stronger.

***Working on RPG/RTS***
Re: Simulate alpha channel? [Re: RyuMaster] #226904
09/11/08 21:57
09/11/08 21:57
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Did you use a tga texture file since otherwise it won't work when applying for an alpha channel wink wink ?
If you did, try adding the following render states underneed the existing one:

Code:
        
SrcBlend = SrcAlpha;
DestBlend = InvSrcAlpha; 


You can also easily test the alpha channel by setting the alpha parameter via the pixel shader like the following example shows:
Code:
 
color.a = 0.2;


Thanks in progress smile smile

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: Simulate alpha channel? [Re: frazzle] #226910
09/11/08 22:15
09/11/08 22:15
Joined: Aug 2006
Posts: 155
R
RyuMaster Offline OP
Member
RyuMaster  Offline OP
Member
R

Joined: Aug 2006
Posts: 155
Oh, I see - thanks! color.a really controls alpha channel. So, thanks to You, I'm one step closer to archieve what I need, cause now I have entity alpha channel under control smile OK. I'll think what to do next. BTW, dont You know any good tutorial or manul where I can learn more about stuff "like SrcBlend = SrcAlpha; DestBlend = InvSrcAlpha;" because I'm still got no clue what they do. Like I can guess only from names, which is not very accurate smile


What kills me not, that makes me stronger.

***Working on RPG/RTS***
Re: Simulate alpha channel? [Re: RyuMaster] #226971
09/12/08 08:46
09/12/08 08:46
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Good to see you're willing to learn about it smile smile
I don't really have a tutorial about render states but I guess this should make things abit more clear wink wink
On the that site, you'll see how it works internally:
Code:
 
// example:
device->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE); 

But to make it compatible with HLSL syntax, you can just use it like:
Code:
 
// example:
ZENABLE = TRUE;

Another great place to look for DirectX API related settings is at MSDN.
Btw, read through this topic, I think it's kinda related to your problem ^^

Thanks in progress

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: Simulate alpha channel? [Re: frazzle] #227025
09/12/08 12:05
09/12/08 12:05
Joined: Aug 2006
Posts: 155
R
RyuMaster Offline OP
Member
RyuMaster  Offline OP
Member
R

Joined: Aug 2006
Posts: 155



Btw, read through this topic, I think it's kinda related to your problem ^^

OMG, I did search forums for "2.5D", how could I missed it? Thanks, my topic is not neccesary anymore, I'm moving there smile


What kills me not, that makes me stronger.

***Working on RPG/RTS***
Re: Simulate alpha channel? [Re: RyuMaster] #227026
09/12/08 12:13
09/12/08 12:13
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Glad I could help you wink wink

Cheers

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Page 2 of 2 1 2

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1