Jump to content

  • Log In with Google      Sign In   
  • Create Account

MadrMan

Member Since 30 Oct 2009
Offline Last Active Mar 29 2012 03:35 AM

Topics I've Started

Frosttrace - A realtime landscape raytracer

28 March 2012 - 09:06 AM

Hello,

We've been making an open source GPGPU-based raytracer for the last couple of weeks, and it has become quite usable.
The project is up on github here: https://github.com/MadrMan/gpgpuraytrace (binaries can be found under downloads here: https://github.com/MadrMan/gpgpuraytrace/downloads)

The raytracer runs realtime at a small resolution on my ATI HD6870 (roughly 10fps)

We're using DirectCompute to do all the raytracing, and the raytracer is tweakable by editing the shaders in the shader folder.
The algorithm we're using to generate the landscape is currently not so great - there's still a lot to do. Any tips regarding performance are much appreciated.

Screenshots below or see http://imgur.com/a/ECPGb
Posted Image

Posted Image

Posted Image

[DX11] Instancing slows down instead of speeding up

11 April 2010 - 11:25 PM

Hai, I'm rendering 400 objects with the same textures/indices/vertices. Usually when rendering this you'd need 400 draw calls, and it ran at 60+ fps. I figured when I made it render with instancing it would get quite a speedup. So after changing stuff a bit it now renders the 400 objects with only 2 draw calls, but the fps went to 30. I ran it trough GPUPerfStudio and it said my fps was limited by my draw calls (when instancing), which doesn't make a lot of sense to me. How can 400 draw calls be fast and not be bottlenecking my code, whereas having only 2 draw calls bottleneck it? Isn't that what instancing is for? To reduce the amount of draw calls needed? I'm instancing by filling a cbuffer with 256 world matrices and sending it to the shader, where it uses SV_InstanceID to get the appropriate world matrix from the cbuffer. The cpu only runs at 40% or so while the app is running so that doesn't seem to be the bottleneck. I've also tweaked the amount of instances that get rendered at the same time, 10, 20, 256, all of them seem to be severely slower than just rendering them normally. So here comes the question: How can using instancing for this slow my app down instead of speeding it up? Am i doing something wrong here or..?

D3D11 DXGI_ERROR_UNSUPPORTED

11 March 2010 - 06:00 AM

Hello, I've made a small D3D11 app which works fine for me, but when other people try to run it they seem to get DXGI_ERROR_UNSUPPORTED on D3D11CreateDeviceAndSwapChain Any idea as to what can cause this? They have fully updated drivers, feb 2010 dx redist, both nvidia, and one of them is on vista sp2 (with platform update) and the other on win7, and both have dx10 capable gpus Making a device with these parameters:
sd.BufferCount = 1;
sd.BufferDesc.Width = 800;
sd.BufferDesc.Height = 600;
sd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
sd.BufferDesc.RefreshRate.Numerator = 60;
sd.BufferDesc.RefreshRate.Denominator = 1;
sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
sd.OutputWindow = (hwnd here);
sd.SampleDesc.Count = 1;
sd.SampleDesc.Quality = 0;
sd.Windowed = TRUE;

featureLevel = D3D_FEATURE_LEVEL_10_1;
driverType = D3D_DRIVER_TYPE_HARDWARE;

HLSL semantics for d3d11 on cbuffers and resources

31 October 2009 - 02:51 AM

I can't seem to be able to find out which semantics global variables and resources in D3D11 use. I'm looping trough all the variables in a shader by getting a list of all the cbuffers, and then checking each variable in it. D3D11_SHADER_VARIABLE_DESC is what i end up with eventually and it seems to have all kinds of info about the variables being used, except the semantic name. (same thing for the resources) For example:
cbuffer TransformCB
{
	matrix mWorld : World;
	matrix mView : View;
	matrix mProjection : Projection;
	matrix mWVP : WorldViewProjection;
};

Texture2D basetexture : Texture0;

Using the D3D11_SHADER_VARIABLE_DESC I can get the name of the cbuffer, the names of the variables (mWorld, mView, etc) but not World, View, Projection. Any ideas on how to get them? The only reference to semantics i see in the d3d11 reflection structures seems to be in D3D11_SIGNATURE_PARAMETER_DESC.SemanticName but that struct is for the shader input and can't be used for cbuffers/global variables/resources The effect framework (which I'm not using) has ID3DX11Effect::GetVariableBySemantic() so it has to be possible somehow..

PARTNERS