Wednesday, April 18, 2012

Raymarching Uncertainty

I've implemented raymarching code in the fragment shader. However, at the moment the object that is supposed to be my cloud is appearing as a black cube. I know why this is occurring; the function that samples density data from the 3D texture I output to the shader always returns 0. I can think of two reasons why this is occurring:

1) The texture I'm sending to the shader is being created incorrectly
2) My sampling function is wrong.

I'm inclined to believe that my texture is being made incorrectly, since I'm using a sampling function similar to the one I used when making a volumetric renderer in CIS 560. Now off to figure out why my texture is wrong...

1 comment:

  1. As we discussed, make sure to set your texture filters to nearest.

    ReplyDelete