Can I Offset vertex in vert shader like this?

I tried use “fract(inPosition.y * sample)” to offset vertex , but I failed.

my vert shader like this:

attribute vec3 inPosition;
attribute vec2 inTexCoord;
attribute vec3 inNormal;

uniform float m_Sample;

uniform mat4 g_WorldViewProjectionMatrix;
varying vec2 texCoord;
varying vec3 debug;

void main() {
	vec4 modelSpacePos = vec4(inPosition, 1.0);

	float sample = 2.;

	float dist = fract(inPosition.y * sample);
	modelSpacePos.x += dist;

	gl_Position = g_WorldViewProjectionMatrix * modelSpacePos;

	texCoord = inTexCoord;

Failed how.

What is the value of inPosition.y?

Are you sure?

Anyway, we don’t have enough information to help.