22 lines
614 B
Text
22 lines
614 B
Text
|
#version 130
|
||
|
#extension GL_EXT_texture_array : enable
|
||
|
|
||
|
in vec2 pass_textureCoordinates;
|
||
|
in float visibility;
|
||
|
in float pass_layer;
|
||
|
in float pass_baseLightingValue;
|
||
|
|
||
|
out vec4 out_Color;
|
||
|
|
||
|
uniform sampler2DArray modelTexture;
|
||
|
uniform vec3 tint;
|
||
|
uniform vec3 skyColor;
|
||
|
|
||
|
void main(void){
|
||
|
vec4 textureColour = texture2DArray(modelTexture,vec3(pass_textureCoordinates, pass_layer));
|
||
|
if(textureColour.a<0.5) discard;
|
||
|
out_Color = textureColour;
|
||
|
out_Color.rgb += tint.xyz;
|
||
|
out_Color.rgb *= pass_baseLightingValue;
|
||
|
out_Color = mix(vec4(skyColor.x,skyColor.y,skyColor.z,1.0),out_Color, visibility);
|
||
|
}
|