How do i pass a value to a shader

hi im trying to import a project from OF to Cinder but i cant make the shader works correctly
i got this : if im correct

    try
         {
           mGlsl = gl::GlslProg::create( loadAsset( "shader.vert" ), loadAsset( "shader.frag" ) );
         }
          catch(const std::exception& e)
          {
           std::cerr << e.what() << '\n';
           console()<<"what what ...//";
          }
  mSphere = gl::Batch::create( geom::Sphere().radius(10).subdivisions(6), mGlsl );

this will load and bind the shader to a sphere
and pass this values then

  mGlsl->uniform("perlins",1.0f);
  mGlsl->uniform("time", 0.01f * (float) getElapsedSeconds());
  mGlsl->uniform("pointscale",10.0f);
  mGlsl->uniform("decay",0.34f);
  mGlsl->uniform("complex",0.0f);
  mGlsl->uniform("waves",2.4f);
  mGlsl->uniform("eqcolor", 3.0f);
  mGlsl->uniform("fragment",false);
  mGlsl->uniform("dnoise", 0.0f);
  mGlsl->uniform("qnoise", 4.0f);
  mGlsl->uniform("r_color", 0.48f);
  mGlsl->uniform("g_color", 0.319f);
  mGlsl->uniform("b_color",0.339f);
  mGlsl->uniform("speed",0.029f);
  mSphere->draw();

but i get alot if errors form the shader so i think im missing something or does the shader need to change ?

What are the errors you’re seeing in the log.

| warning| void cinder::gl::VboMesh::buildVao(const cinder::gl::GlslProg*, const AttribGlslMap&)[500] Batch GlslProg expected an Attrib of USER_DEFINED, with name normal but vertex data doesn’t provide it.
|warning| void cinder::gl::VboMesh::buildVao(const cinder::gl::GlslProg*, const AttribGlslMap&)[500] Batch GlslProg expected an Attrib of USER_DEFINED, with name position but vertex data doesn’t provide it.
|warning| void cinder::gl::Batch::initVao(const AttributeMapping&)[84] VertexAttribArray at location 0 not enabled, this has performance implications.
|warning| void cinder::gl::GlslProg::logMissingUniform(const string&) const[1004] Unknown uniform: “perlins”
|warning| void cinder::gl::GlslProg::logMissingUniform(const string&) const[1004] Unknown uniform: “dnoise”
|warning| void cinder::gl::GlslProg::logMissingUniform(const string&) const[1004] Unknown uniform: “qnoise”
|warning| void cinder::gl::GlslProg::logMissingUniform(const string&) const[1004] Unknown uniform: “speed”

Yep shader variables are probably not mapping correctly. Either you have to bind them explicitly, or follow the naming convention that ci::gl expects. There is some details here, or you can check out the shaders in the samples/_opengl/ folder. Feel free to post your shaders here if you get stuck.

Cheers,
Rich