D3D11: ERROR: ID3D11DeviceContext::Draw: The Shader Resource View in slot 0 of the Pixel Shader unit is using the Format (R8_UINT). This format does not support 'Sample', 'SampleLevel', 'SampleBias' or 'SampleGrad', at least one of which may being used on the Resource by the shader. This mismatch is invalid if the shader actually uses the view (e.g. it is not skipped due to shader code branching). [ EXECUTION ERROR #371: DEVICE_DRAW_RESOURCE_FORMAT_SAMPLE_UNSUPPORTED ]
- use a format you can sample from, e.g. a _FLOAT type. Oh, and by float division I meant ii / 256.0. You will get bad results with ii / 256
- Use Load instead of Sample and wrap manually.
Concerning wrapping. Either you wrap manually (your & 255), or you let the sampler do it. No need to do both. For Load, of course, you need to wrap manually. Alternatively - something I have seen in some Perlin implementation - is to use a bigger array (and duplicate the data) so you can save you the wrapping (Is this what you meant with the 512 wide texture ?).