vertexSource =
"precision mediump float;\n"
"uniform mat4 uModelLastFrame;\n"
- "uniform float uTimeDelta;\n"
+ "float timeDelta = 0.0167;\n"
"uniform float uGeometryStretchFactor;\n"
"uniform float uSpeedScalingFactor;\n"
" vec4 vertex = vec4(aPosition, 1.0);\n"
" vec4 viewSpaceVertex = uModelView * vertex;\n"
" vec4 viewSpaceVertexLastFrame = (uViewMatrix * uModelLastFrame) * vertex;\n"
- " float reciprocalTimeDelta = 1.0 / ((uTimeDelta > 0.0) ? uTimeDelta : 0.01);\n"
+ " float reciprocalTimeDelta = 1.0 / timeDelta;\n"
// work out vertex's last movement in view space
" vec3 viewSpacePosDelta = viewSpaceVertex.xyz - viewSpaceVertexLastFrame.xyz;\n"
// NOTE: we must turn on alpha blending for the actor (HINT_BLENDING)
ShaderEffect shader = ShaderEffect::New( vertexSource, fragmentSource,
- GeometryType(GEOMETRY_TYPE_IMAGE),
ShaderEffect::GeometryHints( ShaderEffect::HINT_BLENDING | ShaderEffect::HINT_GRID) );
//////////////////////////////////////