| 24 | } |
| 25 | |
| 26 | void AddShadowRenderer::process( |
| 27 | uint backgroundTextureID, |
| 28 | uint foregroundTextureID, |
| 29 | const Vector2f& textureSize, |
| 30 | const Camera& camera, |
| 31 | |
| 32 | IRenderTarget& dst ) |
| 33 | { |
| 34 | dst.bind(); |
| 35 | |
| 36 | glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, foregroundTextureID ); |
| 37 | glActiveTexture(GL_TEXTURE1); glBindTexture(GL_TEXTURE_2D, backgroundTextureID ); |
| 38 | glDisable(GL_DEPTH_TEST); |
| 39 | glDisable(GL_BLEND); |
| 40 | glDepthMask(GL_TRUE); // but write the current values |
| 41 | _shader.begin(); |
| 42 | _paramInvProj.set(camera.invViewproj()); |
| 43 | _paramImgSize.set(textureSize); |
| 44 | RenderUtility::renderScreenQuad(); |
| 45 | _shader.end(); |
| 46 | |
| 47 | dst.unbind(); |
| 48 | } |
| 49 | |
| 50 | } /*namespace sibr*/ |