optimized frag shader