Files
IUI/src/Materials/ImGuiMaterial.mat
T
jeanlemotan 1b674c3e64 First
2024-07-03 13:14:02 +02:00

30 lines
638 B
Plaintext

material {
name : ImGui,
parameters : [
{
type : sampler2d,
name : albedo
}
],
requires : [
uv0,
color
],
shadingModel : unlit,
culling : none,
depthCulling: false,
blending : transparent
}
fragment {
void material(inout MaterialInputs material)
{
prepareMaterial(material);
vec2 uv = getUV0();
uv.y = 1.0 - uv.y;
vec4 albedo = texture(materialParams_albedo, uv);
material.baseColor = getColor() * albedo;
material.baseColor.rgb *= material.baseColor.a;
}
}