Skip to main content
GameDev.net gamedev.net
🔒 Locked

Mipmapped bumpmap?

Started by SoaringTortoise May 28, 2003 at 3:47 PM 1 replies 800+ views
Original Post
SoaringTortoise
SoaringTortoise
This is really freaking me out. I had a line of code that looked like this: Set BumpMapTex = D3DX.CreateTexture(d3ddevice, 1024, 1024, 0, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED) Then I called a function that would create the bumpmap from a height map, lock the BumpMapTex and shunt the data into it. This all worked fine, but I was getting some visual glitches because manually creating the texture wouldn''t create a mipmap chain. So, I changed the code to this: Set BumpMapTex = D3DX.CreateTexture(d3ddevice, 1024, 1024, 5, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED) And this failed in an amusing (and embarrassing) way - I obviously wasn''t filling the data on the mipmap chains, so the close-to terrain was bump-mapped and the stuff further away was flat. Then I set the line of code back to Set BumpMapTex = D3DX.CreateTexture(d3ddevice, 1024, 1024, 0, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED) which is as it was before. But... it hasn''t changed a damned thing. I am still getting bump-mapping close-to and flat further away. I have scanned the source code for all references to BumpMapTex, and in no way are mipmap levels ever specified other than on that line, which is saying, "0". Any ideas?
Always prey on the weak, the timid and the stupid. Otherwise you'll just get your butt kicked
For a tortoise, this is extremely hard to do, but when you get it right... the expression on their faces ...
Dactylos
Dactylos
quote:
Original post by SoaringTortoise
I have scanned the source code for all references to BumpMapTex, and in no way are mipmap levels ever specified other than on that line, which is saying, "0".

IIRC, setting that parameter to 0 makes DX automatically generate as many mipmap levels as possible. To get only one level try setting the parameter to 1.

SoaringTortoise
SoaringTortoise
DAGNABIT!

/kicking myself!
/kicking myself!
/kicking myself!

Thanks. I feel really dumb now. Someone delete this thread!
Always prey on the weak, the timid and the stupid. Otherwise you'll just get your butt kicked
For a tortoise, this is extremely hard to do, but when you get it right... the expression on their faces ...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.