Original Post
So I was reading the other day about using PCF for shadow maps, making the edges smooth. I tried this using 16 samples, obviously it's very slow. So I decided to try a method where I would map out the edges of an object, and only use PCF on those lines, thus not wasting the filtering on areas that don't need to be. Basicly, it went something like this: (C++) render_depth_map render_edge_map (HLSL) if (on edge) preform PCF else do not preform PCF this method works very well, the only problem is, it doesn't not save me ANY speed at run-time. I've tested it multiple times and in different ways and it is acting the way it should, but it's running as slowly as if it were doing PCF on the entire image. Adding and removing the 'if' statment can make a big difference on the visual, but the speed remains the same. Is there some special function or call I'm missing that allows the shader to skip over code it doesn't need? Keep in mind these states need to vary per pixel. I noticed a function mentioned in GLSL called "KIL". This seems to relate to the topic. Any ideas?