Does OpenGL support custom (logarithmic in my case) coordinates space ?
I would need to display some raw data and ideally have a Y logarithmic axis. The purpose being not to alter those data and let the GPU do most of the job.
Does OpenGL support custom (logarithmic in my case) coordinates space ? I would need
Share
Assuming the data is dynamic, the GPU would be your best bet.
Simply transform the coordinates in your vertex shader using the glsl
log().If you need log10, use
Make sure to precalc
1 / log(10).In a naive implementation, any color shading in the fragment shader will be linear over pixels (i.e. exponential over source data)… This is the common visual representation in a logarithmic diagram, so you probably don’t need to worry about this.