Jump to content

  • Log In with Google      Sign In   
  • Create Account


safiullahhussaini

Member Since 25 Feb 2010
Offline Last Active Jan 20 2013 02:45 AM

Posts I've Made

In Topic: Which DirectX to Pick

06 January 2013 - 04:46 AM

I always found the DirectX 11 to be simpler to set up. But if the intent is to get something simple up and running, you have to write shader code. Which although is not a bad thing, just that you have to do some household work in the project.<br /><br />DirectX 9, although you are going to call more APIs, you will only be writing in C, not HLSL (if you are doing something simple, and not writing shaders).<br /><br />HLSL is pretty simple to learn but if you are against learning a slightly different programming paradigm, use DX9. So I think it boils down to whether you can or you want to write shaders.

In Topic: Disappearing Data in Structured Buffers

09 December 2012 - 01:41 PM

Problem fixed, it was a rokkie mistake I suppose, I was not properly setting the Resources to the Shader... or something like that.

Thanks a bunch MJP... BTW your book is AWESOME!!!

In Topic: Disappearing Data in Structured Buffers

08 December 2012 - 11:57 PM

This is the PIX report on my vertex shader, seems like the Buffer is binding correctly (At least the strides match).

[source lang="java"]//// Generated by Microsoft ® HLSL Shader Compiler 9.29.952.3111////// Buffer Definitions: //// Resource bind info for VertexBuffer// {//// struct// {// // float4 position; // Offset: 0// float4 color; // Offset: 16//// } $Element; // Offset: 0 Size: 32//// }//// Resource bind info for InstanceBuffer// {//// struct// {// // float4x4 matLocation; // Offset: 0// int strTemplateType; // Offset: 64//// } $Element; // Offset: 0 Size: 68//// }////// Resource Bindings://// Name Type Format Dim Slot Elements// ------------------------------ ---------- ------- ----------- ---- --------// VertexBuffer texture struct r/o 0 1// InstanceBuffer texture struct r/o 1 1//////// Input signature://// Name Index Mask Register SysValue Format Used// -------------------- ----- ------ -------- -------- ------ ------// SV_VERTEXID 0 x 0 VERTID uint x ////// Output signature://// Name Index Mask Register SysValue Format Used// -------------------- ----- ------ -------- -------- ------ ------// SV_POSITION 0 xyzw 0 POS float xyzw// COLOR 0 xyzw 1 NONE float xyzw//vs_4_0dcl_globalFlags refactoringAllowed | enableRawAndStructuredBuffersdcl_resource_structured t0, 32 dcl_resource_structured t1, 68 dcl_input_sgv v0.x, vertex_iddcl_output_siv o0.xyzw, positiondcl_output o1.xyzw#line 82 "C:\Users\Safiullah\Documents\Visual Studio 2010\Projects\RayTracingAttempt\Debug\RTShaders.fx"ld_structured o0.xyzw, v0.x, l(0), t0.xyzw // VS<0,1,2,3>ld_structured o1.x, l(0), l(0), t1.xxxx // VS<4>ld_structured o1.y, l(0), l(20), t1.xxxx // VS<5>ld_structured o1.z, l(0), l(40), t1.xxxx // VS<6>ld_structured o1.w, l(0), l(60), t1.xxxx // VS<7>#line 105ret // Approximately 6 instruction slots used[/source]

In Topic: Disappearing Data in Structured Buffers

08 December 2012 - 11:44 PM

Just Mad the changes but no luck... Right now, my ElementCount is 1, is that a problem?

PARTNERS