slice(color+5) { #ifdef OC_DYNAMIC_LIGHT #ifndef OC_MESH #ifndef OC_SKY fragColor.a /= 4; #endif #endif #endif #ifdef OC_DYNAMIC_LIGHT #ifndef OC_SKY #ifdef OC_MESH // exclude sprites // How smooth should the edge be? Higher = Harder. float edgeSoftness = 500; // Visible part of the model. Higher = Show more. float edgeThickness = 0.01; float aFactor = lightDot(normalize(vec3(0.0,0.0,1.0)), normal); fragColor.a = max(0.0, (min(1.0, (fragColor.a / (edgeSoftness * sqrt(aFactor * edgeThickness)))))); fragColor.rgb = vec3(1,1,1); #endif #endif #endif }