#version 330 #ifndef IS_SEE_THROUGH #moj_import #endif #moj_import #ifndef IS_SEE_THROUGH in float sphericalVertexDistance; in float cylindricalVertexDistance; #endif in vec4 vertexColor; out vec4 fragColor; void main() { #ifdef IS_SEE_THROUGH vec4 color = vertexColor; #else vec4 color = vertexColor * ColorModulator; #endif if (color.a < 0.1) { discard; } #ifdef IS_SEE_THROUGH fragColor = color * ColorModulator; #else fragColor = apply_fog(color, sphericalVertexDistance, cylindricalVertexDistance, FogEnvironmentalStart, FogEnvironmentalEnd, FogRenderDistanceStart, FogRenderDistanceEnd, FogColor); #endif }