When i was learning Depth peeling . i confused with the fellowing code,The texture comparison mode is GL_COMPARE_R_TO_TEXTURE_ARB
"TEX R0.x, fragment.position, texture, SHADOWRECT;
Texture buffer texture contains the contents of the depth buffer from the previous level, against which the depth of the current fragment is compared. Performing a shadow-mapping comparison (as designated by the SHADOWRECT keyword) returns a binary result
Dose it compare fragment.position.z with depth texture? if so,where is the texcoord to access the texture? is it fragment.position.xy play the role of texcoord?but position.xy can be negative . Can someone explain how does this code work?