Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,261 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 7 1 2 3 4 5 6 7
Re: uv-offset texture formats [Re: ventilator] #26581
05/15/04 05:39
05/15/04 05:39
Joined: Oct 2003
Posts: 1,258
Virginia, USA
qwerty823 Offline
Senior Developer
qwerty823  Offline
Senior Developer

Joined: Oct 2003
Posts: 1,258
Virginia, USA
Not sure, but you cant control what gets used when calling bmap_to_uv, unless you know of some other way.


Never argue with an idiot. They drag you down to their level then beat you with experience
Re: uv-offset texture formats [Re: qwerty823] #26582
05/15/04 05:40
05/15/04 05:40
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
oh! i thought converting bitmaps can be done with your dll?

Re: uv-offset texture formats [Re: ventilator] #26583
05/15/04 05:57
05/15/04 05:57
Joined: Oct 2003
Posts: 1,258
Virginia, USA
qwerty823 Offline
Senior Developer
qwerty823  Offline
Senior Developer

Joined: Oct 2003
Posts: 1,258
Virginia, USA
well, maybe. I did do something similar for increasing the depth/stencil buffer, but changing the depth/stencil buffer is quite a bit easier then swaping out one texture for the same texture of a different format.

Last edited by qwerty823; 05/15/04 06:02.

Never argue with an idiot. They drag you down to their level then beat you with experience
Re: uv-offset texture formats [Re: qwerty823] #26584
05/15/04 06:08
05/15/04 06:08
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
Quote:

Just a few things to note:

Loading a bmp, the format becomes D3DFMT_R5G6B5 ( 23 )
Loading a tga, the format becomes D3DFMT_X8R8G8B8 ( 22 )

Calling bmap_to_uv(), makes it D3DFMT_V8U8 ( 60 )
Calling bamp_to_normals(), makes it D3DFMT_A8R8G8B8 ( 21 )






The Miscrosoft BumpWaves.Cpp evidentally generates these:

Code:
 // Load the texture for the background image
if( FAILED( D3DUtil_CreateTexture( m_pd3dDevice, _T("Lake.bmp"),
&m_pBackgroundTexture, D3DFMT_R5G6B5 ) ) )
return D3DAPPERR_MEDIANOTFOUND;

// Create the bumpmap.
m_psBumpMap = CreateBumpMap( 256, 256, D3DFMT_V8U8 );
if( NULL == m_psBumpMap )
return E_FAIL;



Re: uv-offset texture formats [Re: Steempipe] #26585
05/15/04 06:19
05/15/04 06:19
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
has anyone tested if this bumpwaves example works on a geforce card? (i don't have the directx sdk installed...)

Re: uv-offset texture formats [Re: ventilator] #26586
05/15/04 06:21
05/15/04 06:21
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
The bumpwaves example will also tell you, in the window, if it is using straight FFP EMBM or using a vertex shader _ EMBM to do the projection.

Re: uv-offset texture formats [Re: ventilator] #26587
05/15/04 06:24
05/15/04 06:24
Joined: Oct 2003
Posts: 1,258
Virginia, USA
qwerty823 Offline
Senior Developer
qwerty823  Offline
Senior Developer

Joined: Oct 2003
Posts: 1,258
Virginia, USA
I dont have it installed on the machine that has my Gf4ti4200, but it is shared from another. Testing...


Nope, gives an error. Says cant load the required media. (not very helpful)

Last edited by qwerty823; 05/15/04 06:24.

Never argue with an idiot. They drag you down to their level then beat you with experience
Re: uv-offset texture formats [Re: qwerty823] #26588
05/15/04 06:27
05/15/04 06:27
Joined: Sep 2003
Posts: 3,236
San Diego, CA
M
Marco_Grubert Offline
Expert
Marco_Grubert  Offline
Expert
M

Joined: Sep 2003
Posts: 3,236
San Diego, CA
Bumpwaves works on GF3/4. Running with X8R8G8B8 format and Vertex Shaders.
Here's the relevant code:
Code:

Init:
// Create the bumpmap.
m_psBumpMap = CreateBumpMap( 256, 256, D3DFMT_V8U8 );
------
Renderstates:
m_pd3dDevice->SetTexture( 0, m_psBumpMap );
m_pd3dDevice->SetSamplerState( 0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP );
m_pd3dDevice->SetSamplerState( 0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP );
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_BUMPENVMAT00, F2DW( m_matBumpMat._11 ) );
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_BUMPENVMAT01, F2DW( m_matBumpMat._12 ) );
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_BUMPENVMAT10, F2DW( m_matBumpMat._21 ) );
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_BUMPENVMAT11, F2DW( m_matBumpMat._22 ) );
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_BUMPENVLSCALE, F2DW(0.8f) );
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_BUMPENVLOFFSET, F2DW(0.0f) );
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_BUMPENVMAPLUMINANCE );

m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_CURRENT );

// Set up texture stage 1's states for the environment map
m_pd3dDevice->SetTexture( 1, m_pBackgroundTexture );
m_pd3dDevice->SetTextureStageState( 1, D3DTSS_COLORARG1, D3DTA_TEXTURE );
m_pd3dDevice->SetTextureStageState( 1, D3DTSS_COLOROP, D3DTOP_SELECTARG1 );
---------
Vertex shader:
vs.1.1

dcl_position v0
dcl_texcoord v1

m4x4 oPos, v0, c3 ; transform position to the projection space

; Compute vertex position in the camera space - this is our texture coordinates
dp4 r0.x, v0, c0
dp4 r0.y, v0, c1
dp4 r0.z, v0, c2

; Do the rest of texture transform (first part was combined with the camera matrix)
rcp r0.z, r0.z
mad oT1.x, r0.x, r0.z, c8.x
mad oT1.y, r0.y, r0.z, c8.y

mov oT0.xy, v1 ; Copy input texture coordinates for the stage 0;



@qwerty: make sure you have the paths set up correctly..

Last edited by Marco_Grubert; 05/15/04 06:39.
Re: uv-offset texture formats [Re: Marco_Grubert] #26589
05/15/04 06:29
05/15/04 06:29
Joined: Oct 2003
Posts: 1,258
Virginia, USA
qwerty823 Offline
Senior Developer
qwerty823  Offline
Senior Developer

Joined: Oct 2003
Posts: 1,258
Virginia, USA
I just thought of that (since it was running from a share), so it's copying over to the machine now.

Edit: Now that i have it local, it works. Sorry for the scare everyone!

Last edited by qwerty823; 05/15/04 06:37.

Never argue with an idiot. They drag you down to their level then beat you with experience
Re: uv-offset texture formats [Re: qwerty823] #26590
05/15/04 06:41
05/15/04 06:41
Joined: May 2002
Posts: 845
Missouri the "Show me" State
Zerodin Offline
Developer
Zerodin  Offline
Developer

Joined: May 2002
Posts: 845
Missouri the "Show me" State
You know what?
A 'wet surface' shader could even be usefull for making zombies look nasty and slimey!

Page 2 of 7 1 2 3 4 5 6 7

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