Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Endemoniada

Member Since 01 Jul 2003
Offline Last Active Jul 16 2015 08:00 PM

Posts I've Made

In Topic: Glitches in Navigating my NavMesh

27 June 2015 - 03:34 PM

Hi Angus, thanks for addressing those points for me; with your help I was able to get my basic system up and running and it seems pretty robust (so far.) Do you do any kind of agent-agent collision avoidance ? I was thinking about how best to handle that and some pointers will be helpful.

 

Waterlimon, thanks man, I wasn't sure how to undershoot, that info will come in very handy.


In Topic: Snap Camera/Projection to Pixel Increments ?

10 June 2015 - 03:26 PM

Hey, I actually got it to work. Thanks a lot man.


In Topic: Snap Camera/Projection to Pixel Increments ?

09 June 2015 - 08:12 PM

Hi L.,

 

Will you please be a little more specific. When you say "the size of the projection" do you mean the size of the frustum ? I'm sure I can learn how to get the eight points of the frustum (and convert them to world space) if I need to, do I then use those points to compute the size ? Any more info would be appreciated.

 

Thanks a lot.


In Topic: Set a Minimum Mip Level ?

07 June 2015 - 10:37 AM

Hi, I'm not able to get it to work. I'm not even sure if it's generating the mips.

 

 
ID3D11Texture2D* texture;
ID3D11ShaderResourceView* resourceview;
 
// create texture
 
D3D11_TEXTURE2D_DESC textureDesc;
ZeroMemory(&textureDesc, sizeof(textureDesc));

textureDesc.Width = 512;
textureDesc.Height = 512;
textureDesc.MipLevels = 0;
textureDesc.ArraySize = 1;
textureDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
textureDesc.SampleDesc.Count = 1;
textureDesc.SampleDesc.Quality = 0;
textureDesc.Usage = D3D11_USAGE_DEFAULT;
textureDesc.BindFlags = D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE;
textureDesc.CPUAccessFlags = 0;
textureDesc.MiscFlags = D3D11_RESOURCE_MISC_GENERATE_MIPS;
 
if(FAILED(d3d_device->CreateTexture2D(&textureDesc, nullptr, &texture)))
 return E_FAIL;
 
// create shader resource
 
if(FAILED(d3d_device->CreateShaderResourceView(texture, nullptr, &resourceview)))
 return E_FAIL;
 
// generate mips
 
d3d_context->GenerateMips(resourceview);
 

 

Nothing fails but I can't tell if the mips were created or are being used (I thought I could but now I'm not so sure).

 

If I add D3D11_RESOURCE_MISC_RESOURCE_CLAMP to textureDesc.MiscFlags then CreateTexture2D() fails with E_INVAIDARG.

 

I am using NULL for the second argument to CreateShaderResourceView() to keep things less complicated while getting the mips set up, then I'll try what Buckeye suggested above.

 

Thanks guys.

 


In Topic: Set a Minimum Mip Level ?

06 June 2015 - 10:52 PM

Thanks Buckeye, I didn't know about the D3D11_SHADER_RESOURCE_VIEW_DESC struct since I was passing NULL for pDesc in CreateShaderResourceView(). I'll see if I can get it to work tomorrow.


PARTNERS