|
0 registered members (),
635
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
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
Expert
|
Expert
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
|
"Cannot implicitly convert from float3 to float4. reutn color"
Srr my bad ^^ Replace:
float3 color = tex2D(ColorMapSampler, InTex);
with:
float4 color = tex2D(ColorMapSampler, InTex).rgba;
Report back and let me know if it worked  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
RyuMaster
OP
Member
|
OP
Member
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
Expert
|
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  ? If you did, try adding the following render states underneed the existing one:
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: 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: RyuMaster]
#226971
09/12/08 08:46
09/12/08 08:46
|
Joined: Mar 2006
Posts: 2,758 Antwerp,Belgium
frazzle
Expert
|
Expert
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
|
Good to see you're willing to learn about it  I don't really have a tutorial about render states but I guess this should make things abit more clear  On the that site, you'll see how it works internally:
// example:
device->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
But to make it compatible with HLSL syntax, you can just use it like:
// 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
RyuMaster
OP
Member
|
OP
Member
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 
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
Expert
|
Expert
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
|
Glad I could help you  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
|
|
|
|