module voxel.old.shaders

Code Map

module voxel.old.shaders;


//! Cache shaders so they can be resude between different passes and
//! models.
class ShaderStore
{
public:
	this(isAMD: bool) { }
	fn makeComputeDispatchShader(src: u32, dst: u32) gfx.Shader { }
	fn makeElementsDispatchShader(src: u32, dst: u32) gfx.Shader { }
	fn makeArrayDispatchShader(src: u32, dst: u32) gfx.Shader { }
	fn makeListShader(src: u32, dst1: u32, dst2: u32, powerStart: u32, powerLevels: u32, dist: f32) gfx.Shader { }
	fn makeListDoubleShader(src: u32, dst: u32, powerStart: u32) gfx.Shader { }
	fn makeCubesShader(src: u32, powerStart: u32) gfx.Shader { }
	fn makeRayShader(src: u32, powerStart: u32, powerLevels: u32) gfx.Shader { }
	fn makeRayDoubleShader(src: u32, powerStart: u32) gfx.Shader { }
	fn makePointsShader(src: u32, powerStart: u32) gfx.Shader { }
	fn makeQuadsShader(src: u32, powerStart: u32) gfx.Shader { }
	fn makeWalkFrustumShader(srcBaseIndex: u32, dstBaseIndex: u32, counterIndex: u32, powerStart: u32, powerLevels: u32) gfx.Shader { }
	fn makeWalkSplitShader(srcBaseIndex: u32, dstBaseIndex: u32, counterIndex: u32, splitIndex: u32, splitSize: u32, powerStart: u32) gfx.Shader { }
	fn makeWalkSortShader(srcBaseIndex: u32, counterIndex: u32, powerStart: u32) gfx.Shader { }
	fn makeWalkDoubleShader(counterIndex: u32) gfx.Shader { }
	fn makePointsWalkShader(powerStart: u32) gfx.Shader { }
	fn makeCubesWalkShader(src: u32, powerStart: u32) gfx.Shader { }


protected:
	mShaderStore: gfx.Shader[string];
	mCompiler: gfx.Compiler;
	mIsAMD: bool;
}

//! The state that is passed to each step when we are running the
//! pipeline.
struct StepState
{
public:
	matrix: math.Matrix4x4f;
	planes: math.Planef[4];
	camPosition: math.Point3f;
	frame: u32;
	pointScale: f32;
	buffers: GLuint[6];
	atomicBuffer: GLuint;
	commandBuffer: GLuint;
}

fn getStore(c: Create) ShaderStore { }
struct StepState

The state that is passed to each step when we are running the pipeline.

class ShaderStore

Cache shaders so they can be resude between different passes and models.