Every material that has no texture associated becomes completely black when
I do one of the following:

- change the shadow technique from ShadowMap to SoftShadowMap
- add any of the GLSL bloom shader I found on the net (
http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=27976&postdays=0&postorder=asc&start=0or
http://www.gamedev.net/community/forums/topic.asp?topic_id=395186)

Any idea why this is happening?

Details:

I have a single light, declared thusly:

    osg::Vec3 lightPosition(40000,40000,80000); // my prog's scale is big
    osg::LightSource* ls = new osg::LightSource;
    ls->getLight()->setPosition(osg::Vec4(lightPosition,1));
    ls->getLight()->setAmbient(osg::Vec4(0.5,0.5,0.5,1.0));
    ls->getLight()->setDiffuse(osg::Vec4(0.9,0.9,0.9,1.0));
    shadowedScene->addChild(ls);

I'm posting direct links to the shaders, case you're lazy to open those ones
:)

http://magiadosdoces.com/temp/PP_GL_Bloom1.fx
http://magiadosdoces.com/temp/PP_GL_Bloom2.fx
http://magiadosdoces.com/temp/PP_GL_Bloom3.fx
http://magiadosdoces.com/temp/PP_GL_Bloom4.fx
http://magiadosdoces.com/temp/shader.frag

And this is how I'm loading the shaders:
    osg::ref_ptr<osg::StateSet> stateSet(root->getOrCreateStateSet());
    osg::Program* program = new osg::Program;
    osg::Shader* frag = new osg::Shader( osg::Shader::FRAGMENT );
    frag->loadShaderSourceFromFile("Shaders/shader.frag");
    program->addShader(frag);
    stateSet.get()->setAttributeAndModes(program, osg::StateAttribute::ON);

I'm using OSG 2.6, Windows Vista 64, Geforce 8800M GTS.

Oh and by the way, the bloom shader effect doesn't works even on the
textured surfaces. They simply remain the same. Image:
http://magiadosdoces.com/temp/car.jpg

Thanks,
Jefferson
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to