PDA

View Full Version : skipping fragments



Dragon89
02-18-2007, 03:08 PM
how would one skip a fragment (alpha = 0) in GLSL... without using blending or alpha texting... i think ive read somewhere of such a function

Overmind
02-18-2007, 03:46 PM
The "discard" keyword throws the current fragment away.

ehart
02-18-2007, 07:37 PM
Just to clarify, discard is a keyword. To optionally discard a pixel, you do this:


if ( alpha == 0)
discard;-Evan