16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 10:29:19 +02:00
This commit is contained in:
milek7
2018-07-15 23:46:53 +02:00
parent 794093dad4
commit 4c855d5980
26 changed files with 690 additions and 183 deletions

View File

@@ -7,8 +7,11 @@ in vec4 f_light_pos;
#include <common>
#texture (tex1, 0, sRGB_A)
uniform sampler2D tex1;
uniform sampler2DShadow shadowmap;
uniform samplerCube envmap;
float calc_shadow()
{
@@ -89,8 +92,16 @@ void main()
{
vec4 tex_color = texture(tex1, f_coord);
if (opacity == 0.0f && tex_color.a < 0.9f)
discard;
if (opacity == 0.0f)
{
//blending
}
else
{
//test
if (tex_color.a < 0.5f)
discard;
}
float shadow = calc_shadow();
vec3 result = ambient * 0.3 + vec3(1.0) * emission;