Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Game Programming > DirectX > Need some help with alphablend effect for shadows (Direct 3D8 - primitive draw)


Reply
 
Thread Tools Display Modes
  #1  
Old 07-09-2006, 05:58 AM
RonenNess's Avatar
RonenNess RonenNess is offline
Centurion
 
Join Date: Mar 2006
Location: Israel
Posts: 150
Default Need some help with alphablend effect for shadows (Direct 3D8 - primitive draw)


hi everyone.

im working on a RPG game in DX8 (primitive draw), and im having a problem with the objects shadows.

what im basicly doing with shadows, is like painting the objects that doing the shadow, only with RGB of (0,0,0), and strech down. in other words, a shadow for a tree would be a picture of the same tree, only strech down on the ground and in black color.

now im trying to do those shadows half visible, to be realistic.
problem is, when i do alphablend using this render state :

Direct3D_Device.SetRenderState D3DRS_ALPHABLENDENABLE, True


its like Additive blend, like the picture below colors + the picture i merge colors.
which means, with the currnet alphablend i have it can only alphablend things to be brighter. and i need darker..

so can anyone show me how to do normal alphablend that can do things darker?

thanks
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->