add FlatLumTexture.frag/FlatAlphaTexture.frag
This commit is contained in:
parent
8e31af94c8
commit
f8af997de7
BIN
screenshot/DrawText.png
Normal file
BIN
screenshot/DrawText.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 620 KiB |
18
shader/FlatAlphaTexture.frag
Normal file
18
shader/FlatAlphaTexture.frag
Normal file
@ -0,0 +1,18 @@
|
||||
#version 450 core
|
||||
|
||||
layout(binding = 2) uniform sampler2D tex;
|
||||
|
||||
layout(location = 0) in vec2 FragmentTexCoord;
|
||||
layout(location = 0) out vec4 FragColor;
|
||||
|
||||
layout(binding = 1) uniform ColorMaterial
|
||||
{
|
||||
vec4 color;
|
||||
} color_material;
|
||||
|
||||
void main()
|
||||
{
|
||||
float alpha=texture(tex,FragmentTexCoord).r;
|
||||
|
||||
FragColor=vec4(color_material.color.rgb,color_material.color.a*alpha);
|
||||
}
|
18
shader/FlatLumTexture.frag
Normal file
18
shader/FlatLumTexture.frag
Normal file
@ -0,0 +1,18 @@
|
||||
#version 450 core
|
||||
|
||||
layout(binding = 2) uniform sampler2D tex;
|
||||
|
||||
layout(location = 0) in vec2 FragmentTexCoord;
|
||||
layout(location = 0) out vec4 FragColor;
|
||||
|
||||
layout(binding = 1) uniform ColorMaterial
|
||||
{
|
||||
vec4 color;
|
||||
} color_material;
|
||||
|
||||
void main()
|
||||
{
|
||||
float lum=texture(tex,FragmentTexCoord).r;
|
||||
|
||||
FragColor=vec4(color_material.color.rgb*lum,color_material.color.a);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user