1 2 3 4 5 6 7 8 9 10 11 12 13
void applyScatter(inout vec3 col); uniform samplerCube environmentMap; void main() { vec3 ref = textureCube(environmentMap, gl_TexCoord[0].xyz).rgb; applyScatter(ref); gl_FragColor.rgb = ref; gl_FragColor.a = gl_Color.a; }