Hi Christian, It's unusually to use the frag coord as texture coordinate, one would usually only use this for screen based texture coordinations. Is this what you intend?
Might I suggest you start with the OSG examples that all use osg::Program/osg::Shader such as osgshaders, osgshaderterrain etc. Do a search through the OSG sources for relevant examples. Robert. On 15 May 2012 18:56, Christian Rumpf <[email protected]> wrote: > Hello everyone! > > I just learned GLSL and image processing using different filter masks. Now I > want to implement this into my OSG-project, but my test object (a cow ^^) is > black, totally black. > > For the beginning I used the following code for fragment shader: > > > Code: > > uniform sampler2D image; > > void main() > { > gl_FragColor = texture2D(image, gl_FragCoord.xy); > } > > > > > glShaderCompiler said that this code is ok, no errors, but still my test > object is black. > > My Question: > How do I uniform sampler2D which should be my realtime output image? > > lg Christian > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=47731#47731 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

