- Home /
3D Texture and normals
I want to calculate normals for a heightmap generated by sampling a 3D noise texture/volume on an arbitrary plane. I need to store the height and data for calculating the normal in 1 Color(float4). Right now I've used float4.w for the height, and float4.xyz to store the "axis slopes" respectively. Using the face(plane) normal in the shader, how can I convert these axis slopes into a surface normal?
I'm sure this is possible but I'm not sure how much it will cost per fragment and I don't think I have the math skills to figure it out.
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                