Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 04 Jan 2010
Offline Last Active Private

Posts I've Made

In Topic: Perlin Noise - seamless cube maps

18 August 2016 - 03:59 AM

Shouldn't you flip certain coords, e.g. for back (dim - 1 - x, y, dim) or something ? 

In Topic: Creating A Geometry Shader With Stream-Output Fails

04 August 2016 - 09:54 AM

it throws an unhelpful exception about being initialized to null...

geometryShader = new SharpDX.Direct3D11.GeometryShader(defaultDevice, geometryShaderByteCode, outputElements, null, 0);

A null array for the stride(s) doesn't sound right.

In Topic: Height Map Through Compute Shader, Need Some Pointers

04 August 2016 - 09:48 AM

Why not just peek at the solution (3rd source package, SelectedCodeSolutions\CSGpuWavesDemo) ? :wink:

In Topic: Erasing Character

23 July 2016 - 04:49 PM

Precisely, you have been told already.

In Topic: D3D11 - Pretransformed vertices? (GUI)

24 June 2016 - 08:09 AM

Yup, changing the viewport needs adjusted transformations, as Hodgman shows.


You could use scissors (ID3D11DeviceContext::RSSetScissorRects) for axis aligned clipping and keep the viewport as is. Probably the simplest to implement.


For completeness: There are other ways to clip:

- Look into SV_ClipDistance semantic (VS output)

- Similarily: Manually clip in the pixel shader with clip/discard

- For rectangles you could "clip" in the vertex shader (rect intersection calculation, adjusting tex coords, too) (*)

- Hint: SV_Position as input to the pixel shader delivers pixel coordinates (with a 0.5 offset), this can come in handy.


Edit: (*) Can be even a good idea to do this CPU-side. Instead of lots of pipeline state changes, one can batch everything.