Original Post
is there a setting that will make my point sprites bigger when they are close to the camera? or do i have to do the calculation manually in the shaders? using openGL and Cg. thanks
Quote:
Yes GL_POINT_DISTANCE_ATTENUATION isn't define in GL_ARB_point_sprite because it' a define from GL_ARB_point_parameter Wink
It's used with the function glPointParameterfvARB as the following :
glPointParameterfv(GL_POINT_DISTANCE_ATTENUATION, vec3(a, b, c));
This function is used to calculate the point size according to the depth distance between the camera and the point. It's possible configure the calcule with the three parameters a, b, c.
The size of each point rendered is calculated using the formula :
derived_size = clamp(size * sqrt(1 / (a + b * d + c * d ^ 2)))
By default a, b, c are null.
This topic has been locked by a moderator. New replies are not allowed.
GameDev.net uses cookies to ensure you have the best experience on our platform. Learn more