Hi Judy there's no such thins as pseudo-random generator in glsl itself but you can code it for ex:Linear Congruent Generators : https://math.stackexchange.com/questions/337782/pseudo-random-number-generation-on-the-gpu I haven't tested so give us experience feedbacks about this func
(Personnally I generally export random values collected in a image with CPU rand() func into a texture and sample it in the shader with gl_Instance_id ) Cheers xdfanfan wrote: > Hi all, > Now,I have a flt. model with itself texture,but the internal format of the > texture is RGB,not with ALPHA value,so the ALPHA TEST function is disabled. > My question is how to generate some random fixed alpha value of the texture > with the GLSL language,So that I can use the ALPHA TEST function to fufill > the point cloud. > > > Thanks very much! > Judy > > ------------------ > Post generated by Mail2Forum ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72417#72417 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

