Jump to content
  • Advertisement

zhengrong

Member
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

100 Neutral

About zhengrong

  • Rank
    Newbie
  1. zhengrong

    flaw of dxt5_nm

    when we sample normal map from pixel shader, we get interpolated vector, its length is always shorter than 1 if we have set linear filter, right? for regular normalmap, we just re-normalize it, but for normalmap compressed as dxt5_nm, we have only xy channel and have to do somthing like z=sqrt(1-x*x-y*y), so I guess z is always greater than it should be, because xy vector is always shorter than it should be. am I right?
  2. thanks, but how? D3DX_SKIP_DDS_MIP_LEVELS doesn't work for texture files that don't have mipmaps.
  3. thanks! is there anyway to create a specified mipmap level except for the first one from a texture file?
  4. I just found out that D3DX_SKIP_DDS_MIP_LEVELS doesn't work while loading files without mipmap data. when I load a file DOES contain mipmap data(like a dds file with mipmap chain) it works as expected. but for dds withou mipmap, or other format like jpg, it just creates all mipmap levels. does it just work like this? or did I misunderstand anything? here's my code: HRESULT hr = D3DXCreateTextureFromFileInMemoryEx(m_device, data, size, 0, 0, 0, 0, TEXTURE_DXT1, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_SKIP_DDS_MIP_LEVELS(3, D3DX_DEFAULT), 0, NULL, NULL, &d3dTexture); any comment will be appreciated.
  5. zhengrong

    Slow Present when GPU is idle?

    it must be vertical synchronization problem b/c the fps will never over 60. I just don't know why since I have disable it
  6. zhengrong

    Slow Present when GPU is idle?

    thanks for your reply! I forgot to mention that I have created device with PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE, and I did call Present with all params set to NULL
  7. the situation is complicate, but i will put it simple: i was using d3d, i noticed that Present function cost about 10 ms, so i thought it's gpu bounded, but the strange thing is when I open another extremely gpu-consuming program simultaneously, my program didn't seem to drop even 1 fps what maked me even more confused is that no matter how many milliseconds I call Slee() before calling Present(), it alway cost more than 3 ms. what happend in Presnt()? any comment will be appreciated.
  8. zhengrong

    How to render bezier curve with D3D?

    I think lines segments will be ok in this case, Thank you !
  9. I'm writing code to make my camera moving in cubic bezier curves, and I think it'll be nice if I can see the camera track, but I just don't know what's the right way to render the curve. Is there a way to render a 3d bezier curve other than breaking it into line segments? Thanks.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!