marble

所属分类:OpenGL
开发工具:Visual C++
文件大小:374KB
下载次数:10
上传日期:2011-06-08 15:33:24
上 传 者porly
说明:  大理石三维纹理渲染,采用噪声方式,下载看看
(Marble three-dimensional texture rendering, the use of noise way, download the look)

文件列表:
Marble (0, 2006-08-29)
Marble\Bitmap Font (0, 2006-08-29)
Marble\Bitmap Font\BITMAP_FONT.cpp (2889, 2006-08-29)
Marble\Bitmap Font\BITMAP_FONT.h (953, 2006-08-29)
Marble\colorlookup.tga (1339, 2006-08-29)
Marble\Extensions (0, 2006-08-29)
Marble\Fps Counter (0, 2006-08-29)
Marble\Fps Counter\FPS_COUNTER.cpp (973, 2006-08-29)
Marble\Fps Counter\FPS_COUNTER.h (825, 2006-08-29)
Marble\GL files (0, 2006-08-29)
Marble\GL files\extensionList.txt (8371, 2006-08-29)
Marble\GL files\GLee.c (668766, 2006-08-29)
Marble\GL files\GLee.h (559562, 2006-08-29)
Marble\GL files\LoadProgram.cpp (2630, 2006-08-29)
Marble\GL files\LoadProgram.h (625, 2006-08-29)
Marble\Image (0, 2006-08-29)
Marble\Image\IMAGE.h (2247, 2006-08-29)
Marble\Image\IMAGE_CalculateStride.cpp (1322, 2006-08-29)
Marble\Image\IMAGE_ExpandPalette.cpp (1790, 2006-08-29)
Marble\Image\IMAGE_Load.cpp (1573, 2006-08-29)
Marble\Image\IMAGE_Load24BitBMP.cpp (2536, 2006-08-29)
Marble\Image\IMAGE_Load8BitBMP.cpp (3160, 2006-08-29)
Marble\Image\IMAGE_LoadAlpha.cpp (2126, 2006-08-29)
Marble\Image\IMAGE_LoadBMP.cpp (1638, 2006-08-29)
Marble\Image\IMAGE_LoadCompressedTrueColorTGA.cpp (4854, 2006-08-29)
Marble\Image\IMAGE_LoadTGA.cpp (1978, 2006-08-29)
Marble\Image\IMAGE_LoadUncompressed8BitTGA.cpp (3307, 2006-08-29)
Marble\Image\IMAGE_LoadUncompressedTrueColorTGA.cpp (2890, 2006-08-29)
Marble\License.txt (4775, 2006-08-29)
Marble\LOG (0, 2006-08-29)
Marble\LOG\LOG.cpp (2487, 2006-08-29)
Marble\LOG\LOG.h (1382, 2006-08-29)
Marble\Main.cpp (11073, 2006-08-29)
Marble\Main.h (979, 2006-08-29)
Marble\Marble.exe (360448, 2006-08-29)
Marble\marbleFP.txt (10300, 2006-08-29)
Marble\marbleVP.txt (1452, 2006-08-29)
Marble\Maths (0, 2006-08-29)
Marble\Maths\COLOR.cpp (1284, 2006-08-29)
... ...

************************************************************************** ** Marble ** ** www.paulsprojects.net ** ** paul@paulsprojects.net ************************************************************************** Description: This demo generates a solid marble texture in a fragment program. A 3d texture is first created in which each texel is a gradient, a unit vector in 3 space. For each fragment drawn, the fragment program samples the 8 gradients on the integer coordinates surrounding the fragment. These are then used in the standard perlin noise method (see reference below) to generate a noise factor n1. The weighting factors used in doing this are sampled from a second 3d texture. This process is then repeated at twice the frequency to generate a second octave of noise, n2. To create the marble effect, these values are fed into the function sin(x+z+n1+0.5*n2). Finally, this sin value is range compressed into [0, 1] and used to look up in a color ramp texture. The demo simply draws a teapot 'carved out' of this 3d texture. Requirements: OpenGL 1.3 ARB_fragment_program ARB_vertex_program References: "The Perlin Noise Math FAQ", by Matt Zucker. From www.robo-murito.net/code/perlin-noise-math-faq.html Keys: F1 - Take a screenshot Escape - Quit

近期下载者

相关文件


收藏者