/////////////////////////////////////////////////////////////////////////////// // // ## ###### // ###### ### // ## ############### Shark 3D Engine (www.shark3d.com) // ########## # # # // ######## Copyright (c) 1996-2006 Spinor GmbH. // ######### # # # All rights reserved. // ## ########## // ## // /////////////////////////////////////////////////////////////////////////////// uniform vec4 tex0RcpSize; uniform vec4 passInfo; varying vec2 screen; varying vec2 scale; /////////////////////////////////////////////////////////////////////////////// void main(void) { // Transform position to clip space gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; // Smoothing parameters: // Go from wide to small to avoid artifacts in case of depth jumps. // Use pow(2,iter) instead of pow(3,iter), // because this gives a better quality: float iter = passInfo.x; float smooth = exp2(iter); screen.xy = gl_MultiTexCoord0.xy; scale.xy = tex0RcpSize.xy * smooth; } ///////////////////////////////////////////////////////////////////////////////