SM.Core: + Particle System + scriptable system for scripts ~ Moved Texts- and Particles-namespace to SM.Base.Drawing ~ Changed how you tell the stopwatch to pause. (From method to property) ~ Fixed Randomize.GetFloat(min, max) ~ Now automaticly adds the DrawingBase.Transformation to DrawContext.ModelMatrix. No need to change DrawContext.Instances[0], anymore. SM.OGL: + "one-file-shader"-support SM2D: + DrawParticles (Control for Texture and Color not there yet) ~ Changed coordnate system to upper-right as (1,1) ~ Changed default shader to "one-file-shader"
29 lines
No EOL
506 B
GLSL
29 lines
No EOL
506 B
GLSL
#version 330
|
|
|
|
//# region vertex
|
|
|
|
//# import SM_base_vertex_basic
|
|
void ApplyTexModifier();
|
|
void CheckVertexColor();
|
|
void ApplyModelTransformation();
|
|
|
|
void vmain() {
|
|
ApplyTexModifier();
|
|
CheckVertexColor();
|
|
ApplyModelTransformation();
|
|
}
|
|
|
|
//# region fragment
|
|
in vec2 vTexture;
|
|
in vec4 vColor;
|
|
|
|
uniform vec4 Tint;
|
|
uniform bool UseTexture;
|
|
uniform sampler2D Texture;
|
|
|
|
layout(location = 0) out vec4 color;
|
|
|
|
void fmain() {
|
|
color = vColor * Tint;
|
|
if (UseTexture) color *= texture(Texture, vTexture);
|
|
} |