Hook to transmit 3D normals to DDraw
Moderator: JeremyaFr
Hook to transmit 3D normals to DDraw
- JeremyaFr
- Posts: 3989
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Hello,
Here is a new hook.
This hook transmits vertex normals to DDraw via the specular component.
The w part of the specular component is set to 1.0f.
The xyz parts contains the normal:
0.0 means -1.0
0.5 means 0.0
1.0 means 1.0
Download link:
xwa_hook_normals.zip
Here is a new hook.
This hook transmits vertex normals to DDraw via the specular component.
The w part of the specular component is set to 1.0f.
The xyz parts contains the normal:
0.0 means -1.0
0.5 means 0.0
1.0 means 1.0
Download link:
xwa_hook_normals.zip
- Trevor
- Posts: 541
- Joined: Thu Dec 04, 2014 7:11 pm
Oh wow, I assume this is only of use to Blues ddraw and has no effect on your default one?
Trev
Trev
- blue_max
- Posts: 2296
- Joined: Wed Mar 20, 2019 5:12 am
That is correct, Trevor. Jeremy -- being the genius that he is -- figured out a way to send smooth normal data down to ddraw in a way that won't disrupt any other version of ddraw. I'm currently adding support for specular shading using this hook, here's a preview:
This information will allow me to implement true normal mapping, replace XWA's shading system and a few other things. In short: there's going to be more eye candy in our near future thanks to Jeremy.
This information will allow me to implement true normal mapping, replace XWA's shading system and a few other things. In short: there's going to be more eye candy in our near future thanks to Jeremy.
You do not have the required permissions to view the files attached to this post.
- Rookie_One1
- Posts: 1657
- Joined: Thu Feb 26, 2004 12:01 am
Seriously, with all that we are getting, next versions of XWAUP and DSUCP will look better than most newer games(including what EA did with star wars )
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death
Current Holder of the Frying Pan of Death
- ual002
- Posts: 983
- Joined: Wed Sep 24, 2008 2:23 am
If we can figure out a way to tie new lighting effects to the .TIE mission light sources, I think we would be set.
- JeremyaFr
- Posts: 3989
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Global lights are stored in
Local lights are stored in
Code: Select all
// V0x00782848
dword s_XwaGlobalLightsCount;
// V0x007D4FA0
Array<XwaGlobalLight,8> s_XwaGlobalLights;
// S0x07D4FA0
struct XwaGlobalLight
{
/* 0x0000 */ int PositionX ;
/* 0x0004 */ int PositionY ;
/* 0x0008 */ int PositionZ ;
/* 0x000C */ float DirectionX ;
/* 0x0010 */ float DirectionY ;
/* 0x0014 */ float DirectionZ ;
/* 0x0018 */ float Intensity ;
/* 0x001C */ float XwaGlobalLight_m1C ;
/* 0x0020 */ float ColorR ;
/* 0x0024 */ float ColorB ;
/* 0x0028 */ float ColorG ;
/* 0x002C */ float BlendStartIntensity ;
/* 0x0030 */ float BlendStartColor1C ;
/* 0x0034 */ float BlendStartColorR ;
/* 0x0038 */ float BlendStartColorB ;
/* 0x003C */ float BlendStartColorG ;
/* 0x0040 */ float BlendEndIntensity ;
/* 0x0044 */ float BlendEndColor1C ;
/* 0x0048 */ float BlendEndColorR ;
/* 0x004C */ float BlendEndColorB ;
/* 0x0050 */ float BlendEndColorG ;
};
Code: Select all
// V0x00782840
dword s_V0x0782840;
// V0x007FA360
Array<S0x07FA360,128> s_V0x07FA360;
// S0x07FA360
struct S0x07FA360
{
/* 0x0000 */ int PositionX ;
/* 0x0004 */ int PositionY ;
/* 0x0008 */ int PositionZ ;
/* 0x0F0C */ byte unk0C [12];
/* 0x0018 */ float Distance ;
/* 0x001C */ dword Intensity ;
/* 0x0020 */ float ColorA ;
/* 0x0024 */ float ColorR ;
/* 0x0028 */ float ColorB ;
/* 0x002C */ float ColorG ;
};
- blue_max
- Posts: 2296
- Joined: Wed Mar 20, 2019 5:12 am
Thanks Jeremy! Quick question: s_V0x0782840 looks like the local light count, would you know if that's correct?
- Trevor
- Posts: 541
- Joined: Thu Dec 04, 2014 7:11 pm
YAY glass finally looks shiny again (was only shiny in software mode oddly in d3d6)
Agreed, next update is going to be really awsome.
Trev
Agreed, next update is going to be really awsome.
Trev
-
- Posts: 457
- Joined: Sat Aug 13, 2005 11:01 pm
Eh, I doubt that.Rookie_One1 wrote: ↑Tue Jan 07, 2020 2:01 pmSeriously, with all that we are getting, next versions of XWAUP and DSUCP will look better than most newer games(including what EA did with star wars )
- ual002
- Posts: 983
- Joined: Wed Sep 24, 2008 2:23 am
Well, this definitely has more depth, that's for sure.