19.09.2020
+ Vector-classes + Added Background ~ Changed OpenTK.Vector2 to SM.Base.Types.Vector2
This commit is contained in:
parent
a603ecc417
commit
acccf5f0e7
22 changed files with 295 additions and 27 deletions
|
|
@ -3,10 +3,12 @@
|
|||
in vec2 vTexture;
|
||||
|
||||
uniform vec4 Tint;
|
||||
uniform bool UseTexture;
|
||||
uniform sampler2D Texture;
|
||||
|
||||
layout(location = 0) out vec4 color;
|
||||
|
||||
void main() {
|
||||
color = Tint * texture(Texture, vTexture);
|
||||
color = Tint;
|
||||
if (UseTexture) color *= texture(Texture, vTexture);
|
||||
}
|
||||
|
|
@ -13,7 +13,7 @@ namespace SM.Base.Shader
|
|||
u["MVP"].SetMatrix4(context.View * context.World);
|
||||
u["ModelMatrix"].SetMatrix4(context.ModelMatrix);
|
||||
u["Tint"].SetUniform4(context.Material.Tint);
|
||||
u["Texture"].SetTexture(context.Material.Texture, 0);
|
||||
u["Texture"].SetTexture(context.Material.Texture, 0, u["UseTexture"]);
|
||||
}));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue