# LoadSpriteShader

## Description

Loads a shader used for modifying sprites, as such it only contains a pixel shader, the vertex shader is automatically generated to make sure it appears in the right place. This type of shader should only be applied to sprites but nothing bad will happen if you choose to apply it to objects, it will just produce unusual rendering results for that object. Currently shaders default to GLSL version 1.10, the line "#version 110" will be automatically added as the first line of the shader unless you specify a "#version " line of your own. Note that doing this may mean your shader does not work on all devices and platforms. The global "precision" value will be added and should not be included in the shader source. IDs are shared across all shader types so loading a sprite shader into ID 1 will not work if a normal shader exists with ID 1.

## Definition

LoadSpriteShader( shaderID, szPixelFile )

void agk::LoadSpriteShader( UINT shaderID, const char* szPixelFile )

integer LoadSpriteShader( szPixelFile )

UINT agk::LoadSpriteShader( const char* szPixelFile )

## Parameters

- shaderID - An ID used to reference this shader in other commands.
- szPixelFile - The file name of the pixel shader file, normally ending .ps