   Accessing R32F from within shader
  Hello, first a big Thanks to everyone on this forum. It's been really helpful. Now, on to the question:I've been accessing texture colors from within my pixel shader by using:InputColor = tex2D(theTextureSampler, theTextureCoords);I now need to pass some 32-bit floats to the shader to use as a lookup table and it's my understanding that I should use an R32F texture that I have loaded with the necessary values. How does one go about accessing the values in an R32F texture from within the shader program? I've looked online and haven't been able to find the answer so far. Thanks in advance.-L   
  Do a texture look up like for an ordinary ARGB texture, but only read the red channel: float color = tex2D(theTextureSampler, theTextureCoords).r;;  I see, that's straight forward. I've written colors to a texture but never raw floats. Now that I'm looking at how to actually write the data to the texture, I see it's not as straight forward as I anticipated. Is this the correct approach?:// Create texture/surface:LUTtexture = new Texture(device, width, height, 1, 0, Format.R32F, Pool.Managed);Surface LUTsurface = LUTtexture.GetSurfaceLevel(0);SurfaceDescription desc = LUTtexture.GetLevelDescription(0);// Lock texture for writing. Use overload without a "Rectangle" argument to indicate entire surface is to be locked, and use "LockFlags.Discard" since the entire surface is to be overwritten with the LUT data:float[] textureData = (float)LUTsurface.LockRectangle(LockFlags.Discard);textureData[0] = FloatValues[0];textureData[1] = FloatValues[1];etc...LUTsurface.UnlockRectangle();