I want to change the colors of an Image Layer through a shader.
The image is a GeoTiff with only one band.
To customize the coloring I add the <shader> tag and use the "fragment_coloring" position in my earth file and it works.
But this way I have to use as input a preprocessed color value which ranges from 0 to 1 (inout vec4 color).
I would like to kown if it is possible to access the interpolated value on that fragment of the original raster band ?
Without shader code, the terrain color appears where NODATA is defined, like if NODATA are treated as transparent and then the terrain color reveals.
When added a GLSL code at fragment_coloring position, all the globe will be painted. Thus, for the NODATA, I tried setting the color to fully transparent or to discard it but this way the concerned parts of the globe become transparent (I see the clear/background color, not the terrain color).
How can I get, with shader code, the terrain color to display where NODATA is defined in the layer as it is the case without shader code?
Is there a documentation available about the uniform/attributes that are available at each OsgEarth shader stage ?
I mean for example what is the uniform name to get the texture in my case, how do I get the texture u v coordinates ?
Sorry if my questions are stupid! I am new in GLSL development.