Standard Shader Format
The standard shader format is used with the standard render pipeline. The standard pipeline and shader are used by the ItemHandler system.
Note: This format is not finalized and could change in the future.
Vertex Shader
Layouts
layout (location=0) in vec3 position;
layout (location=1) in vec2 texCoord;
layout (location=2) in vec3 vertexNormal;
layout (location=5) in mat4 modelViewInstancedMatrix;
layout (location=9) in mat4 modelLightViewInstancedMatrix;
layout (location=14) in float selectedInstanced;
Uniforms
uniform mat4 orthoProjectionMatrix;
uniform int isInstanced;
uniform mat4 modelViewNonInstancedMatrix;
uniform mat4 modelLightViewNonInstancedMatrix;
uniform mat4 projectionMatrix;
uniform float selectedNonInstanced;
Fragment Shader Uniforms
material :: The material for the object.
struct Material
{
vec4 ambient;
vec4 diffuse;
vec4 specular;
int hasTexture;
float reflectance;
sampler2D overlayTextures[5];
int numberOfOverlays;
};
uniform Material material;
texture_sampler :: The primary texture for the object.
uniform sampler2D texture_sampler;
Last updated
Was this helpful?