14.12.2012 Views

Direct3D HLSL Programming using RenderMonkey IDE

Direct3D HLSL Programming using RenderMonkey IDE

Direct3D HLSL Programming using RenderMonkey IDE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Noise Generation<br />

• Use volumetric noise texture<br />

• Sample the texture <strong>using</strong><br />

interpolated object position<br />

modified by noise frequency<br />

– Prevents marble from “swimming”<br />

float4 noise (float4 x)<br />

{<br />

return tex3D (noise_volume, x);<br />

}<br />

// Signed noise generation //<br />

float4 snoise (float4 x)<br />

{<br />

return 2.0f * tex3D (noise_volume, x) - 1.0f;<br />

}<br />

Game Developer Conference, San Jose, CA, March 7 th 2003

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!