 
     // Sample GGX environment map.
     float lod = clamp(perceptualRoughness * float(u_MipCount), 0.0, float(u_MipCount));
-    vec3 reflection = sampleDirection;
-    vec4 specularSample = textureLod(u_GGXEnvSampler, reflection, lod);
+    //vec3 sampleDirection = refractionThin(v, n, 1.0, 1.5);
+    vec3 sampleDirection = refractionSolidSphere(v, n, 1.0, 1.5, getNormal(true), 2.0);
+    vec4 specularSample = textureLod(u_GGXEnvSampler, sampleDirection, lod);
     vec3 specularLight = specularSample.rgb;
 
 #ifndef USE_HDR
     specularLight = SRGBtoLINEAR(specularLight);
 #endif
 
-   return specularLight * (specularColor * brdf.x + brdf.y);
+   vec3 specular = specularLight * (specularColor * brdf.x + brdf.y);
+   return specular;
 }
 
 vec3 getLambertianIBLContribution(vec3 n, vec3 diffuseColor)

    #endif

    color = (f_emissive + f_diffuse + f_specular + f_subsurface + (1.0 - reflectance) * f_sheen) * (1.0 - clearcoatFactor * clearcoatFresnel) + f_clearcoat * clearcoatFactor;

    float ao = 1.0;
    // Apply optional PBR terms for additional (optional) shading


    #ifdef MATERIAL_SUBSURFACE
        f_subsurface += getSubsurfaceIBLContribution(materialInfo.subsurfaceScale, materialInfo.subsurfaceDistortion, materialInfo.subsurfacePower, materialInfo.subsurfaceColor, materialInfo.subsurfaceThickness, -view, normal, view);
    #endif

    #ifdef MATERIAL_TRANSMISSION
        //f_transmission += getTransmissionIBLContribution(normal, view, materialInfo.perceptualRoughness, specularColor, materialInfo.transmissionIor, materialInfo.transmissionFactor, materialInfo.baseColor);
        //f_specular = f_transmission;
        //g_finalColor.rgb = f_specular + f_diffuse;
        //return;
        //g_finalColor.rgb = materialInfo.baseColor;
        //g_finalColor.rgb = f_transmission.rgb;
        //return;
        //f_diffuse = mix(f_diffuse, f_transmission, materialInfo.transmissionFactor);
        //f_diffuse = f_transmission;
    #endif
#endif

