Hi Kim, Thank you very much, i found out the problem, i had to disable the glare in my code as well.
Regards, On Tue, Mar 1, 2011 at 10:48 AM, Mahendra G.R <[email protected]>wrote: > Hi Kim, > > Still i"m getting the glare effect, this is my fragment shader.. > > // > > varying vec3 v_V; > varying vec3 v_N; > uniform bool osgOcean_EnableGlare; > > > void main() { > vec3 N = normalize(v_N); > vec3 V = normalize(v_V); > vec3 R = reflect(V, N); > vec3 L = normalize(vec3(gl_LightSource[0].position)); > > //vec4 ambient = gl_FrontMaterial.ambient; > //vec4 diffuse = gl_FrontMaterial.diffuse * max(dot(L, N), 0.0); > //vec4 specular = gl_FrontMaterial.specular * pow(max(dot(R, L), 2.0), > gl_FrontMaterial.shininess); > //gl_FragColor = ambient + diffuse - specular; > > > if(osgOcean_EnableGlare) > { > gl_FragData[1] = vec4(0.0); > } > > gl_FragData[0] = vec4(1.0,0.0,0.0,1.0); > } > > // > > Am i missing something?. > > > Regards, > > > > On Tue, Mar 1, 2011 at 10:20 AM, Kim Bale <[email protected]> wrote: > >> Hi Mahendra, >> >> This look like you haven't taken into account the glare rendering in your >> shader. >> >> If you want the glare pass to ignore your model you need to set the value >> in the glare buffer to zero >> >> See: >> http://code.google.com/p/osgocean/source/browse/trunk/resources/shaders/terrain.frag#119 >> >> >> (From the trunk version which uses MRT). >> >> Regards, >> >> Kim. >> >> >> >> On 1 March 2011 09:14, Mahendra G.R <[email protected]> wrote: >> >>> Hi Kim, >>> >>> I have attached the screenshot ( http://tinypic.com/r/wwnqmp/7 ) of the >>> image, can you please tell me why am i getting these water like highlights >>> on the model, my shaders for the model just set a red color. >>> >>> Regards, >>> >>> >>> >>> Hi Kim, >>>> >>>> I have attached the screenshot of the image, can you please tell me why >>>> am i getting these water like highlights on the model, my shaders for the >>>> model just set a red color. >>>> >>>> Regards, >>>> >>>> >>>> On Wed, Feb 23, 2011 at 10:11 AM, Mahendra G.R <[email protected] >>>> > wrote: >>>> >>>>> Hi Kim, >>>>> Sorry, i'm not at work, i can only send you on tuesday next week :( , >>>>> thanks for your support. >>>>> >>>>> >>>>> On Wed, Feb 23, 2011 at 10:06 AM, Kim Bale <[email protected]>wrote: >>>>> >>>>>> Can you send a screenshot, it might shed some light on the matter. >>>>>> >>>>>> Kim. >>>>>> >>>>>> >>>>>> On 22 February 2011 16:33, Mahendra G.R <[email protected]>wrote: >>>>>> >>>>>>> Hi Kim, >>>>>>> >>>>>>> i wrote a really simple shader, which does nothing but assign red >>>>>>> color to the model, but i see water like reflections on the model, >>>>>>> thats why >>>>>>> i'm confused :( , however, if i run the program with --disableShaders >>>>>>> argument, then i loose all the nice effects and also the specular >>>>>>> highlights >>>>>>> on the model. >>>>>>> >>>>>>> >>>>>>> Regards, >>>>>>> >>>>>>> >>>>>>> On Tue, Feb 22, 2011 at 5:27 PM, Kim Bale <[email protected]>wrote: >>>>>>> >>>>>>>> Hi Mahendra, >>>>>>>> >>>>>>>> Regardless of whether there are any other shaders at work, if you >>>>>>>> attached a shader to your model it should override any other shaders >>>>>>>> bound >>>>>>>> before it. >>>>>>>> >>>>>>>> I don't really know what else to suggest, there are too many unknown >>>>>>>> variables for me to diagnose the problem. I don't know what shader you >>>>>>>> used, >>>>>>>> or what material properties your model has etc. >>>>>>>> >>>>>>>> Regards, >>>>>>>> >>>>>>>> Kim. >>>>>>>> >>>>>>>> >>>>>>>> On 22 February 2011 15:54, Mahendra G.R <[email protected]>wrote: >>>>>>>> >>>>>>>>> Hi Kim, >>>>>>>>> >>>>>>>>> still no result :( , i wrote two shaders and attached it to my >>>>>>>>> model, and disabled useDefaultShader flag, but still i see specular >>>>>>>>> hightlight on the model, exactly like in the water, still some shader >>>>>>>>> working somewhere?? >>>>>>>>> >>>>>>>>> Regards, >>>>>>>>> >>>>>>>>> >>>>>>>>> On Tue, Feb 22, 2011 at 2:57 PM, Mahendra G.R < >>>>>>>>> [email protected]> wrote: >>>>>>>>> >>>>>>>>>> Yes, i will do that, thanks for your support >>>>>>>>>> >>>>>>>>>> Regards, >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Tue, Feb 22, 2011 at 2:35 PM, Kim Bale >>>>>>>>>> <[email protected]>wrote: >>>>>>>>>> >>>>>>>>>>> If you are disabling the default shader then the lighting effects >>>>>>>>>>> you see will be the result of the fixed function shading. You >>>>>>>>>>> should look at >>>>>>>>>>> the specular properties of the light and the material and check >>>>>>>>>>> that they >>>>>>>>>>> are not too high. >>>>>>>>>>> >>>>>>>>>>> K. >>>>>>>>>>> >>>>>>>>>>> On 22 February 2011 13:29, Mahendra G.R <[email protected] >>>>>>>>>>> > wrote: >>>>>>>>>>> >>>>>>>>>>>> Hi Kim, >>>>>>>>>>>> >>>>>>>>>>>> I disabled the default scene shader and now the model looks very >>>>>>>>>>>> specular, though i see some color, does light source has any >>>>>>>>>>>> effect here?, >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Thanks, >>>>>>>>>>>> Regards >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Tue, Feb 22, 2011 at 2:09 PM, Mahendra G.R < >>>>>>>>>>>> [email protected]> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Hello Kim, >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks for the reply, i dont think its the problem with the >>>>>>>>>>>>> shaders, but somehow the stateset of my model is being changed (i >>>>>>>>>>>>> guess), Is >>>>>>>>>>>>> there way to overcome this problem without disabling the shaders >>>>>>>>>>>>> and loosing >>>>>>>>>>>>> all those nice effects, basically my material ONLY has some color >>>>>>>>>>>>> properties >>>>>>>>>>>>> and nothing more!, btw, i"m using the osgOcean example file to >>>>>>>>>>>>> load my model >>>>>>>>>>>>> (does it matter?). >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks, >>>>>>>>>>>>> Regards >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> On Tue, Feb 22, 2011 at 1:55 PM, Kim Bale < >>>>>>>>>>>>> [email protected]> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> Hi Mahendra, >>>>>>>>>>>>>> >>>>>>>>>>>>>> osgOcean uses shaders for most of it's rendering techniques. >>>>>>>>>>>>>> By default osgocean will apply a default shader to all children >>>>>>>>>>>>>> that are >>>>>>>>>>>>>> added to ocean scene. Certain effects like the glare and depth >>>>>>>>>>>>>> of field >>>>>>>>>>>>>> shaders and fogging rely on a shader implementation to ensure >>>>>>>>>>>>>> that the >>>>>>>>>>>>>> relevant render targets are filled. >>>>>>>>>>>>>> >>>>>>>>>>>>>> The default shader provided by osgocean is very basic as I >>>>>>>>>>>>>> cannot anticipate everyone's shader needs. Thus if you want the >>>>>>>>>>>>>> default >>>>>>>>>>>>>> shader to take into account particular material properties you >>>>>>>>>>>>>> can either >>>>>>>>>>>>>> override the defuault shader or attach shader directly to the >>>>>>>>>>>>>> node you wish >>>>>>>>>>>>>> to render. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Alternatively you may choose to disable the default shader, ( >>>>>>>>>>>>>> http://code.google.com/p/osgocean/source/browse/trunk/include/osgOcean/OceanScene#599) >>>>>>>>>>>>>> however >>>>>>>>>>>>>> you will lose the DOF, glare and fogging effects if no other >>>>>>>>>>>>>> shader >>>>>>>>>>>>>> implementation is provided. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Regards, >>>>>>>>>>>>>> >>>>>>>>>>>>>> Kim. >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> On 22 February 2011 10:28, Mahendra G.R < >>>>>>>>>>>>>> [email protected]> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Hi all, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> I'm using osgOcean and placing a model in the middle of the >>>>>>>>>>>>>>> ocean, this model has some material properties (its basically a >>>>>>>>>>>>>>> .ive file), >>>>>>>>>>>>>>> when i load the model with osgViewer, its fine, i see all the >>>>>>>>>>>>>>> colors etc. >>>>>>>>>>>>>>> but when i render it placing it inside the ocean, i loose the >>>>>>>>>>>>>>> features of >>>>>>>>>>>>>>> the model. I read somewhere in the forum to try disabling the >>>>>>>>>>>>>>> shaders and >>>>>>>>>>>>>>> recompile osgOcean (though i felt it had nothing to do with the >>>>>>>>>>>>>>> shaders, >>>>>>>>>>>>>>> just gave a try), did anyone else try loading models in >>>>>>>>>>>>>>> osgOcean ?? >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Regards, >>>>>>>>>>>>>>> Mahendra >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>> http://www.mahendragr.com >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>>> 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 >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> http://www.mahendragr.com >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> http://www.mahendragr.com >>>>>>>>>>>> >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> 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 >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> http://www.mahendragr.com >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> http://www.mahendragr.com >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> 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 >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> http://www.mahendragr.com >>>>>>> >>>>>>> _______________________________________________ >>>>>>> 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 >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> http://www.mahendragr.com >>>>> >>>> >>>> >>>> >>>> -- >>>> http://www.mahendragr.com >>>> >>> >>> >>> >>> -- >>> http://www.mahendragr.com >>> >>> _______________________________________________ >>> 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 >> >> > > > -- > http://www.mahendragr.com > -- http://www.mahendragr.com
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

