Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 12 Oct 2006
Offline Last Active Apr 21 2015 12:59 PM

#5221507 SampleCmpLevelZero samples return 0 only

Posted by on 05 April 2015 - 01:44 PM

And just to show that RenderDoc was trying to warn me of my downfall, here's some shots with the unset and set sampler. They've even gone and highlighted it in red for me tongue.png


I had noticed this earlier in my debugging but I dismissed it too easily. I guess I didn't trust my tools. Lesson learned.




#5221506 SampleCmpLevelZero samples return 0 only

Posted by on 05 April 2015 - 01:24 PM

Amazing what some food can do. So after hours spent on this I finally have my answer.


Don't create your samplers in the .fx file. It's dependent on the Effects library and so it won't actually set the parameters that you ask for, just the default values.


So yeah, moving the sampler description into code and setting it there fit everything right up.


For some similar issues you can look here at least.




#5216755 ShaderResourceView sRGB format having no effect on sampler reads

Posted by on 15 March 2015 - 07:06 PM

Thanks very much for the function explanation, it's definitely a little bit confusing biggrin.png.


I might need to look into some more details since applying just the filter didn't change things, but applying both the format and filter did.

imageLoadInfo.Format = SharpDX.DXGI.Format.R8G8B8A8_UNorm_SRgb;
imageLoadInfo.Filter = SharpDX.Direct3D11.FilterFlags.SRgb | SharpDX.Direct3D11.FilterFlags.None;

Thanks MJP!

#4821704 Vertices, Normals and Indices

Posted by on 10 June 2011 - 07:58 AM

Think about a cube also.

A cube has 8 vertices, but there needs to be 3 normals at each of those vertices (for a total of 24 normals) if you want to get accurate shading results. Have a look at this image for an example of that. Cube with proper normals. These additional normals are typically created when the angle between two normals on the same vertex break a certain threshold.

If you had just one averaged normal at each vertex then you get this and that's going to give you some funky shading.