Shader Format
Shader Format
=========================================
Version: 1.0
Note:
If you want to modify any of the included shaders, please copy it and create a file
with another name,
because it might be overwritten if we update the original.
If a shader can't be compiled, you will get an error message in the app, stating
that it couldn't be loaded.
If that happens, you will find the shader error log <shader>dsd.log in the same
directory as the <shader>.dsd file.
Tags:
// All file-paths are relative to the .dfx's path
<options>
name=<name, max. 31 chars>
textures=<number of textures, range=[1;16]>
</options>
<vheader>
// GLSL code, that will be prepended to ALL vertex shaders before global header
</vheader>
<fheader>
// GLSL code, that will be prepended to ALL pixel shaders before global header
</fheader>
<header>
// GLSL code, that will be prepended to ALL vertex and pixel shaders
</header>
<include>
// Content of file will be prepended to ALL vertex and pixel shaders
// (after the header).
file=<filename>
</include>
<texture:index>
// null: for FBO textures
// framebuffer: DS screen framebuffer
// filename.raw: for additionally needed custom textures
input=<null,framebuffer,filename.raw>
// width and height are only valid for textures loaded from files.
// The size of FBO-bound textures is determined by the output-scale value in the
pass.
width=<width of texture>
height=<height of texture>
// format, internalformat and type are ignored for framebuffer input
format=<OpenGL texture format>
internalformat=<OpenGL internal texture format>
type=<OpenGL data type>
min_filter=<GL_LINEAR,GL_NEAREST>
mag_filter=<GL_LINEAR,GL_NEAREST>
</texture>
Tags:
<vertex>
// Vertex shader GLSL code
</vertex>
<fragment>
// Pixel shader GLSL code
</fragment>