I suppose you are using a normal framebuffer.
I this case it is pretty normal, that your original value that is in the
image (you unfortunately didn't tell use if the value comes from a texture)
doesn't exactly match the value in the framebuffer. Usually the
framebuffer has 8bit per color channel, which makes the value of
0.174977 not representable.
If you need the "exact" value to be in the framebuffer you'll have to
render it to a floating point buffer via RTT.
Also you didn't tell us how you got the result value. There is also the
possibility that you read an interpolated/filtered value.
If you provide a bit more context someone might be able to help you with
your problem
Hello,
when I write gl_FragColor = vec4(0.174977,0,0,1) in Frag shader,
then I get through a related image: float Vec4: (0.176471,0,0,1)
so why 0.174977 changed into 0.176471?
I think there should be no process there after per fragment operations
that can change this element in the rendering pipeline. Blend,
alphatest and so on are all disenabled.
Thank you in advance!
Shuiying
_______________________________________________
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