Eulerian Smoke Simulation on the GPU
shaders/DividingCubes.gs File Reference

A dividing cubes geometry shader. More...

Functions

vec3 getCubeCorner (int _index)
 Returns a cube's corner.
float sampleVert (int _i)
 Samples the scalar field on a grid vertex.
int fetchEdgeTableVal (int _i)
 Fetches a texel of the edge table texture.
void main (void)
 Geometry shader entry point.

Variables

uniform isampler1D edgeTableTex
 The edge table texture.
uniform vec3 marchingStep
 The marching step.
uniform float isoLevel
 The iso level threshold.
uniform sampler3D densityTex
 the scalar field's 3D texture.
uniform int samplingChannel
 The texture channel to sample from.
uniform mat4 projectionMatrix
 The Projection Matrix generated from the Camera.
uniform mat4 ViewMatrix
 The View Matrix generated from the Camera.
uniform mat4 ModelMatrix
 The Model Matrix generated from the scene transforms.
varying out vec4 position
 The calculated vertex positions (output to fragment shader).

Detailed Description

A dividing cubes geometry shader.


Function Documentation

int fetchEdgeTableVal ( int  _i)

Fetches a texel of the edge table texture.

Parameters:
[in]_itable index
vec3 getCubeCorner ( int  _index)

Returns a cube's corner.

Parameters:
[in]_indexThe corner index.

The following section is modified from :- Cyril Crassin (2007). Tutorial on implementing Marching Cubes algorithm using OpenGL API Geometry Shaders extension available at: http://www.icare3d.org/content/view/50/9/ accessed at 02/04/11

end of citation

void main ( void  )

Geometry shader entry point.

The following section is modified from :- Cyril Crassin (2007). Tutorial on implementing Marching Cubes algorithm using OpenGL API Geometry Shaders extension available at: http://www.icare3d.org/content/view/50/9/ accessed at 02/04/11

end of citation

float sampleVert ( int  _i)

Samples the scalar field on a grid vertex.

Parameters:
[in]_thevertex index.
 All Classes Files Functions Variables