I have a gdscript
@export var wave_pattern : NoiseTexture2D
func _physics_process(_delta: float) -> void:
position.y = wave_pattern.noise.get_noise_2d(position.x / 100.0, position.z / 100.0) * 10.0
and a shader with the following code
render_mode world_vertex_coords;
uniform sampler2D wave;
void vertex() {
float height = texture(wave, VERTEX.xz / 100.0).r;
VERTEX.y = height * 10;
}
both the wave_pattern and wave have the same NoiseTexture2D assigned to them with just a simple FastNoiseLite perlin noise texture
however if I attach the gdscript to a Node3D and use the shader as a material for a plane and overlap them, then let the game run the heigths don't match up
side note: get_noise_2d seems to always return 0 no matter the noise behind it at 0 0
and it seems to not care if I set the NoiseTexture2D to be normalized and returns values between -1 and 1 anyway (I haven't accounted for it in this example but I have tried to negate this and it doesn't seem to be fixing my issue)
This indicator should be at the water surface