title: accesing to RGB and depth buffer of fragment shader : GLSL
body: <p>continue to this question : </p>
  
  <p><a href="https://stackoverflow.com/questions/42016590/glsl-accessing-framebuffer-to-get-rgb-and-change-it/42016814#42016814">GLSL : accessing framebuffer to get RGB and change it</a></p>
  
  <p>Is it possible to develop program based on GLSL as follows?</p>
  
  <ol>
  <li>draw object1 </li>
  <li>get depth buffer using shader (also save rgb)</li>
  <li>draw object 1, object 2 simultaneously</li>
  <li>get detph</li>
  <li>check if depths are different (depth 2 vs depth 4)</li>
  <li>draw object 1 
  : for the range that depth isn't changed -> draw as original RGB
  : for the range that depth is changed -> draw with different RGB</li>
  </ol>
  
  <p>I confirmed this algorithm which distinguishes object 1 is hidden by other object using glut functions. 
  I used glReadbuffer, glDrawbuffer functions. However those are too slow, I want to use GLSL. </p>