• Advertisement


This topic is now archived and is closed to further replies.


This topic is 5410 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

for(i = 255; i >= 0; i--) { int j; for(j = 0; j < 256; j++) { int m=(int)(255-sqrt(i*i+(255-j)*(255-j))+0.5); if(m<0) m=0; fog_texture[i * 256 + j] = m; } } glGenTextures(1, &planar_fog); //... glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE , 256, 256, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, fog_texture); What coversion work is been done by glTexImage2D API with GL_LUMINANCE flag to convert my fog_texture array''s data into actucal texels? Thanks. We create world.

Share this post

Link to post
Share on other sites

  • Advertisement