Added Summeries

This commit is contained in:
Michel Fedde 2021-03-19 20:59:02 +01:00
parent 71a22df8bd
commit 8296d9b8a9
47 changed files with 812 additions and 177 deletions

View file

@ -5,9 +5,15 @@ using SM.OGL.Shaders;
namespace SM2D.Shader
{
public class ShaderCollection
class ShaderCollection
{
/// <summary>
/// The most basic shader, that renders only one thing and only allows colors and one texture.
/// </summary>
public static SimpleShader Basic = new SimpleShader("basic", AssemblyUtility.ReadAssemblyFile("SM2D.Shader.ShaderFiles.basic.glsl"), SetUniforms);
/// <summary>
/// The same fragment shader as <see cref="Basic"/>, but allows to be instanced and used in (f.E.) text.
/// </summary>
public static SimpleShader Instanced = new SimpleShader("instanced", AssemblyUtility.ReadAssemblyFile("SM2D.Shader.ShaderFiles.basic.glsl"), SetUniforms);
static void SetUniforms(UniformCollection uniforms, DrawContext context)

View file

@ -11,5 +11,4 @@ layout(location = 0) out vec4 color;
void main() {
color = v_Color * Tint;
if (UseTexture) color *= texture(Texture, v_TexCoords);
color *= 1.2;
}