<@if not DEFERRED_BUFFER_WRITE_SLH@> <@def DEFERRED_BUFFER_WRITE_SLH@> /* // the glow intensity uniform float glowIntensity; // the alpha threshold uniform float alphaThreshold; */ void packDeferredFragment(vec3 normal, float alpha, vec3 diffuse, vec3 specular, float shininess) { // gl_FragData[0] = vec4(diffuse.rgb, mix(gl_Color.a, 1.0 - gl_Color.a, step(diffuse.a, alphaThreshold))); gl_FragData[0] = vec4(diffuse.rgb, alpha); gl_FragData[1] = vec4(normal, 0.0) * 0.5 + vec4(0.5, 0.5, 0.5, 1.0); gl_FragData[2] = vec4(specular, shininess / 128.0); } <@endif@>