Shader needs return value from java

Hi guys,
I need your help to implement a debugging feature I do really much desire…

I have a custom material with custom shaders to display e.g. the height of the terrain at the given position (just calulating the fragment color with the fragment position).

I do also want to have the possibility to display return values of my gerneration noise algorithms.
The appstate with the debugging shader has access to the java class that holds the noises, but I do not know how to pass them to the shader.
The noise methods give return values between -1 and 1 and I want to display them in game (e.g. I enter a command in the console to display the biome noise and the whole array of biome 1 is green, biome 2 is red and so on…)

I do not have much experience with glsl. I know how to pass parameters but since the value is different on every fragment that does not help me much. I could not find anything useful on the net…
Any approaches how to do this?

Thanks for any help… :wink:

You’d have to make a texture and pass it. Shaders can’t call Java code… never ever ever will that happen.

I feared that mighte be the answer :confused: I am gonna try if I can do it :smiley: