76 lines
2 KiB
HTML
76 lines
2 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>Whitenoise Procedural Textures</TITLE>
|
|
<LINK type="text/css" rel="stylesheet" href="../webdocs.css">
|
|
</HEAD>
|
|
|
|
<BODY>
|
|
<H1>Whitenoise Procedural Textures</H1>
|
|
|
|
<P>The whitenoise procedural texture generates random greyscale
|
|
noise every frame. The effect is similar to static on your
|
|
television.</P>
|
|
<PRE class="syntax">
|
|
<B>ATD1</B>
|
|
<B>type = whitenoise</B>
|
|
<B>width =</B> <I>integer</I>
|
|
<B>height =</B> <I>integer</I>
|
|
</PRE>
|
|
|
|
<H4>Parameters</H4>
|
|
|
|
<DL>
|
|
<DT><I>width</I></DT>
|
|
|
|
<DD>Width of the texture, must be a power of two.</DD>
|
|
|
|
<DT><I>height</I></DT>
|
|
|
|
<DD>Height of the texture, must be a power of two.</DD>
|
|
</DL>
|
|
|
|
<H4>Remarks</H4>
|
|
|
|
<P>The whitenoise algorithm fills a greyscale 8-bit texture
|
|
with random bits. If requested, a color version of this can be
|
|
implemented as well. Note that this texture will probably not
|
|
tile very well. In addition, if you have multiple occurences of
|
|
this texture in the same room, they will all display exactly
|
|
the same static at exactly the same time. You can get around
|
|
this by using different offsets and scale factors in the
|
|
texture to make each one look a little different. This is
|
|
better than making separate texture definition files, unless
|
|
you are using very small texture sizes.</P>
|
|
|
|
<H4>Advanced OpenGL parameters</H4>
|
|
|
|
<DL>
|
|
<DT><I>internal format</I></DT>
|
|
|
|
<DD>GL_LUMINANCE (8-bit greyscale)</DD>
|
|
|
|
<DT><I>GL_TEXTURE_MIN_FILTER</I></DT>
|
|
|
|
<DD>GL_NEAREST (no mipmapping or interpolation)</DD>
|
|
|
|
<DT><I>GL_TEXTURE_MAG_FILTER</I></DT>
|
|
|
|
<DD>GL_NEAREST (no interpolation)</DD>
|
|
</DL>
|
|
|
|
<H4>Example</H4>
|
|
<PRE class="syntax">
|
|
type = whitenoise
|
|
width = 64
|
|
height = 64
|
|
</PRE>
|
|
|
|
<P>Will generate a texture like this:</P>
|
|
|
|
<P><IMG src="proc_whitenoise.gif" alt=
|
|
"Example whitenoise image"></P>
|
|
</BODY>
|
|
</HTML>
|
|
|