+vec4 reflection() {
+ vec3 I = normalize(worldFragPos - worldViewPos);
+ vec3 R = reflect(I, normalize(worldNormal));
+ return vec4(texture(skybox, R).rgb, 1);
+}
+
+vec4 refraction() {
+ float ratio = 1.f / material.refractiveIndex;
+ vec3 I = normalize(worldFragPos - worldViewPos);
+ vec3 R = refract(I, normalize(worldNormal), ratio);
+ return vec4(texture(skybox, R).rgb, 1);
+}