3d texture coloring and shading

Hi, I am new to OpenGL. Want to ask a probably simple question: What is the general procedure for coloring a 3D texture? For example, I have extracted slices from a glTexImage3D, built from a float-type array with some arbitrary value range (not [0,1]). The first step I can see is probably transforming the data array to RGB(A) array, and then do the shading? What is the usage of GLSL fragment shaders in this pipeline? Can someone indicate? Thank you very much.

I think 3D Textures is an advanced topic, I still don’t know how to properly utilize them yet. Might want to start with 2D Textures first, it’s got a much less steep learning curve.


P.S. My youtube channel covers many topics from learnopengl.com and features a few nice videos on texturing in different ways.