Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

Martin Perry

Member Since 23 Feb 2012
Offline Last Active Mar 19 2013 05:49 AM
-----

Topics I've Started

Levenberg-Marquardt NN learning

04 March 2013 - 06:49 AM

Hi,

 

I am trying to teach my NN with Levenberg-Marquardt. But my problem is, that instead of error decreasing, its increasing. For classic XOR I start eg. with error 1.07 and end with 1.99975.

 

Classic BP is working just fine. I used LMA according to this paper: Efficient algorithm for training neural networks with one hidden layer

 

My code: http://pastebin.com/8LmDMpzU
 

 

Can anyone help me to understand, what´s wrong ?

 

Thanks


Rain Rendering

08 December 2012 - 05:44 AM

Hi,

I have been looking for ways, how to render rain. Basicly, they are 2 main approaches. First, using full screen quad, from Tatarchuk (ShaderX5), and the second using particles. For that, I found http://developer.download.nvidia.com/SDK/10/direct3d/Source/rain/doc/RainSDKWhitePaper.pdf. The second paper, from NVidia, looks better for me.
Can anyone tell me, which is better ? In the Tatarchuk approach, isn' t there problem, if camera is facing directly UP ?

Thanks

Generate contours from image

24 November 2012 - 11:00 AM

Hi,

I want to generate contours from image based on several values (tressholds in A, B, C....). So far, I am using Marching Squares, which works fine. Now for the problem. If I use MATLAB "contourc" function, I got far better results. My main problem is with duplicite contours.
Is there any better and still easy to implement algorithm besides Marching Squares ? And If anonyo knew, what MATLAB is using...

Thanks

Isolines (contours) and image coloring

18 October 2012 - 06:41 AM

Hi,

I have image with contours (isolines) that represent temperatures.
Something like this:
Posted Image

Now... I want to color image... areas between isolines with certain color. So far, I extract areas from image (with seed-fill / flood-fill). Than I have list of coordinates for each area... after that I found area border value and according to this I color inside of area... problem with this approach is, that
a) not very fast
b) is aferas are small, incorrect plotting of edges create areas detection incorrect

How to do this better ?

[DX11] Instancing - Vertex Shader linkage error

14 August 2012 - 09:04 AM

Hi,
I have problem with my instancing code. I have found similar topic on this forum, but that solution didn´t work.

I am getting these errors:
D3D11: ERROR: ID3D11DeviceContext::DrawIndexedInstanced: Input Assembler - Vertex Shader linkage error: Signatures between stages are incompatible. Semantic 'TEXCOORD' is defined for mismatched hardware registers between the output stage and input stage. [ EXECUTION ERROR #343: DEVICE_SHADER_LINKAGE_REGISTERINDEX ]
D3D11: ERROR: ID3D11DeviceContext::DrawIndexedInstanced: Input Assembler - Vertex Shader linkage error: Signatures between stages are incompatible. The input stage requires Semantic/Index (TEXCOORD,1) as input, but it is not provided by the output stage. [ EXECUTION ERROR #342: DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND ]


My shader code is:
struct VS_INSTANCE_INPUT_PT2
{
float3 inPos : POSITION;
float2 inTexCoords : TEXCOORD0;
float2 tmp : TEXCOORD1;
};
/**********************************/
/*   VS_OUTPUT	 */
/**********************************/
struct PS_INPUT
{
float4 position : SV_POSITION; //position in projected coordinates
float4 viewPos : TEXCOORD0;  //position in world-view coordinates
float2 TexCoord : TEXCOORD1; //texture coordinates for texturing
 
  float3 normal   : TEXCOORD2;
   float3 posWorld : TEXCOORD3;
};

/*======================== SIGNATURE - PT2 =====================================*/
PS_INPUT BasicModelVS_PT2( VS_INSTANCE_INPUT_PT2 input)
{
PS_INPUT Output = (PS_INPUT)0;
Output.position = CalcPositionInWorld(float4(input.tmp, 1, 1));
Output.viewPos = mul(float4(input.tmp, 1, 1), mul(xWorld, xView));

Output.TexCoord = input.inTexCoords;
Output.TexCoord.y = 1 - Output.TexCoord.y;
float3 posWorld = mul((float4(input.tmp, 1, 1), xWorld);  
Output.posWorld = posWorld;
Output.normal = float3(0, 1, 0);

return Output;
}

And Semantics is
+  SemanticName: "POSITION"
  SemanticIndex 0
  Format DXGI_FORMAT_R32G32B32_FLOAT
  InputSlot 0
  AlignedByteOffset 0
  InputSlotClass D3D11_INPUT_PER_VERTEX_DATA
  InstanceDataStepRate 0

+  SemanticName "TEXCOORD"
  SemanticIndex 0
  Format DXGI_FORMAT_R32G32_FLOAT
  InputSlot 0
  AlignedByteOffset 12
  InputSlotClass D3D11_INPUT_PER_VERTEX_DATA
  InstanceDataStepRate 0

+  SemanticName "TEXCOORD"
  SemanticIndex 1
  Format DXGI_FORMAT_R32G32_FLOAT
  InputSlot 1
  AlignedByteOffset 0
  InputSlotClass D3D11_INPUT_PER_INSTANCE_DATA
  InstanceDataStepRate 1

Creating InputLayout is correct, HRESULT is S_OK, no other errors.. but when I call deviceContext->DrawIndexedInstanced, above errors occur.

Thanks

PARTNERS