Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 29 Jan 2012
Offline Last Active Apr 07 2013 06:04 PM

Topics I've Started

help with creating a structured buffer

09 January 2013 - 01:11 AM

here is what I am trying to do, which is just to create a structured buffer.

    D3D11_BUFFER_DESC sb_desc;
    sb_desc.ByteWidth = stride * numElements;
    sb_desc.Usage = D3D11_USAGE_DEFAULT;
    sb_desc.CPUAccessFlags = 0;
    sb_desc.MiscFlags |= drawIndirect ? D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS : 0;
    sb_desc.StructureByteStride = stride;
    DXCall( device->CreateBuffer( &sb_desc, NULL, &sb ) );

It fails every time, and if I remove the D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS flag, the error goes away.


I've tried different parameters but no luck at this point.

Any help is appreciated.

inconsistent frametime

08 June 2012 - 11:14 PM

Hello all,
I have a scene with nothing but 4 instances of a 26K vertices model. and there are two post passes. with one deferred shader and an anti-aliasing pass. the resolution is 1280x720. and my frame time follows this pattern:
This has been bothering me for a long time. Does anyone know why this happens?

question about how to downsample a texture

29 February 2012 - 01:25 PM

I did some research on downsampling recently but couldn't find a clear answer, it almost feels like everybody thinks it's too simple to mention..
Currently my way of doing downsampling is to draw a smaller textured quad to a smaller render target.
So if I want to downsample my diffuse map which is 1280x720, to a quarter sized texture. I will have to draw a 640x360 textured quad to a 640x360 render target. and I'm not sure if it's the right way.
Also, if I want to render my scene onto a render target of a different size, do I modify the SV_Position inside the shader or change the projection transformation, or is there some other way to do it?

adding post process slows down my frametime?

29 January 2012 - 04:59 PM

I'm new to graphics and still wondering how do people set up their post processing passes.
so I draw all my object onto a render target texture. and then apply FXAA on that texture and output to the back buffer.
This takes 7-8ms every frame.

Then I added another post process shader which do nothing but pass through color. And the frametime goes up to 14-15ms.
Is it normal or did I do something wrong?

the pipeline is something like this:

draw objects onto a screen size texture -> render the same texture onto another screen size texture -> apply fxaa to this texture and output to backbuffer