void GetMaterials(out float smoothness, out float skyOcclusion, out vec3 normal, out vec3 fresnel3,
                  vec2 coord) {
    vec2 specularData = texture(colortex3, coord).rg;

    smoothness = specularData.r;
    smoothness *= smoothness;
    smoothness *= smoothness;

    smoothness = max(SMOOTHNESS_MULTIPLIER*0.01, smoothness);

    smoothness /= 2.0 - smoothness;

    skyOcclusion = specularData.g;

	normal = DecodeNormal(texture(colortex6, coord).xy);

	fresnel3 = texture(colortex1, coord).rgb * smoothness;
}