Quantcast
Channel: Question and Answer » hlsl
Viewing all articles
Browse latest Browse all 69

How to sample png heightmap in HLSL

$
0
0

I am working on simple parallax shader and I have problem with sampling height texture for value.
My aproach amples texture and give me RGB values of picture:

tex2D(TextureHeightSampler, input.BaseOutput.TexCoordAndViewDistance.xy)

But I am not sure how to convert RGB data to height value. How to solve that?


Viewing all articles
Browse latest Browse all 69

Trending Articles