   [DirectX10] advice on how to implement a volumetric shader
  I've been thinking of using a volumetric shader for the maze walls in my Pac-Man clone, but I'm having some difficulty figuring out how to approach it. I've been looking at this Gamasutra article from 2001 (!), which provides a decent explanation of theory, but I'm a bit of an hlsl neophyte, and I'd like some advice on how to move forward with it.What I'm thinking of so far:Create a texture the size of the back buffer, with format DXGI_FORMAT_R32_FLOAT, or maybe DXGI_FORMAT_R16_FLOAT. I don't think a texture of half the width/height would work here.In the first pass, turn off depth testing, and cull front-facing tris (so I'm rendering back-facing tris). Render to the texture the distance from the camera to the fragment, using an additive blendIn the second pass, still without depth testing, cull back-facing tries (so I'm rendering front-facing tris). Render to the texture the distance from the camera to the fragment using a subtractive blendI should now have a texture that contains data for the "total thickness" of the maze walls at any given pixel.I'm not sure how to proceed from there. I need a third pass to actually sample into this texture to get the data I need to come up with the final color, but how I do that is a little foggy to me. Should I use projective texture coordinates to determine where to sample for each pixel? That makes sense, right?And, this Gamasutra article is almost ten years old. So I'm curious if there's a better approach on DX10 hardware.Thank you.   