source: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/IllumDemo/bin/res/levelutil/shader/prog/ogl_glsl/lightfilter_ogl_glsl_vs1x0.s3d_shadercode_run @ 2196

Revision 2196, 1.2 KB checked in by szirmay, 17 years ago (diff)
Line 
1///////////////////////////////////////////////////////////////////////////////
2//
3//      ##  ######
4//       ######  ###
5//  ## ###############        Shark 3D Engine (www.shark3d.com)
6//   ########## # # #
7//    ########                Copyright (c) 1996-2006 Spinor GmbH.
8//   ######### # # #          All rights reserved.
9//  ##   ##########
10//      ##
11//
12///////////////////////////////////////////////////////////////////////////////
13
14uniform vec4 tex0RcpSize;
15uniform vec4 passInfo;
16
17varying vec2 screen;
18varying vec2 scale;
19
20///////////////////////////////////////////////////////////////////////////////
21
22void main(void)
23{
24    // Transform position to clip space
25    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
26
27    // Smoothing parameters:
28    // Go from wide to small to avoid artifacts in case of depth jumps.
29    // Use pow(2,iter) instead of pow(3,iter),
30    // because this gives a better quality:
31    float iter = passInfo.x;
32    float smooth = exp2(iter);
33   
34    screen.xy = gl_MultiTexCoord0.xy;
35    scale.xy = tex0RcpSize.xy * smooth;
36}
37
38///////////////////////////////////////////////////////////////////////////////
Note: See TracBrowser for help on using the repository browser.