summaryrefslogtreecommitdiffstats
path: root/o3d/samples/beachdemo/shaders_glsl/imageshader.glsl
blob: 07c3940cb8e0e6068d6fc9e2e2b6ec3a228ac7cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// glslv profile log:
// 61 lines, 0 errors.

// glslf profile log:
// 61 lines, 0 errors.

// glslv output by Cg compiler
// cgc version 2.0.0010, build date Dec 12 2007
// command line args: -profile glslv
//vendor NVIDIA Corporation
//version 2.0.0.10
//profile glslv
//program vertexShaderFunction
//semantic worldViewProjection : WORLDVIEWPROJECTION
//semantic colorMult
//semantic diffuseSampler
//var float4x4 worldViewProjection : WORLDVIEWPROJECTION : _ZZ2SworldViewProjection[0], 4 : -1 : 1
//var float4 colorMult :  :  : -1 : 0
//var sampler diffuseSampler :  :  : -1 : 0
//var float4 input.position : $vin.POSITION : POSITION : 0 : 1
//var float2 input.texcoord : $vin.TEXCOORD0 : TEXCOORD0 : 0 : 1
//var float4 vertexShaderFunction.position : $vout.POSITION : POSITION : -1 : 1
//var float2 vertexShaderFunction.texcoord : $vout.TEXCOORD2 : TEXCOORD2 : -1 : 1

attribute vec4 position;
attribute vec4 texcoord0;
vec4 _glPositionTemp;
uniform vec4 dx_clipping;

struct VertexShaderInput {
    vec4 position;
    vec2 texcoord;
};

struct PixelShaderInput {
    vec4 position;
    vec2 texcoord;
};

PixelShaderInput _ZZ3Sret_0;
vec4 _ZZ3SrZh0004;
uniform mat4 worldViewProjection;

 // main procedure, the original name was vertexShaderFunction
void main()
{


    _ZZ3SrZh0004 = position.x*worldViewProjection[0];
    _ZZ3SrZh0004 = _ZZ3SrZh0004 + position.y*worldViewProjection[1];
    _ZZ3SrZh0004 = _ZZ3SrZh0004 + position.z*worldViewProjection[2];
    _ZZ3SrZh0004 = _ZZ3SrZh0004 + position.w*worldViewProjection[3];
    _ZZ3Sret_0.position = _ZZ3SrZh0004;
    _ZZ3Sret_0.texcoord = texcoord0.xy;
    gl_TexCoord[2].xy = texcoord0.xy;
    _glPositionTemp = _ZZ3SrZh0004; gl_Position = vec4(_glPositionTemp.x + _glPositionTemp.w * dx_clipping.x, dx_clipping.w * (_glPositionTemp.y + _glPositionTemp.w * dx_clipping.y), _glPositionTemp.z * 2.0 - _glPositionTemp.w, _glPositionTemp.w);
    return;
} // main end


// #o3d SplitMarker
// #o3d MatrixLoadOrder RowMajor

// glslf output by Cg compiler
// cgc version 2.0.0010, build date Dec 12 2007
// command line args: -profile glslf
//vendor NVIDIA Corporation
//version 2.0.0.10
//profile glslf
//program pixelShaderFunction
//semantic worldViewProjection : WORLDVIEWPROJECTION
//semantic colorMult
//semantic diffuseSampler
//var float4x4 worldViewProjection : WORLDVIEWPROJECTION : , 4 : -1 : 0
//var float4 colorMult :  : _ZZ2ScolorMult : -1 : 1
//var sampler diffuseSampler :  : _ZZ2SdiffuseSampler : -1 : 1
//var float2 input.texcoord : $vin.TEXCOORD2 : TEXCOORD2 : 0 : 1
//var float4 pixelShaderFunction : $vout.COLOR : COLOR : -1 : 1



struct VertexShaderInput {
    vec2 texcoord;
};

struct PixelShaderInput {
    vec2 texcoord;
};

vec4 _ZZ3Sret_0;
sampler2D _ZZ3SsZh0004;
uniform vec4 colorMult;
uniform sampler diffuseSampler;

 // main procedure, the original name was pixelShaderFunction
void main()
{


    _ZZ3SsZh0004 = sampler2D(diffuseSampler);
    _ZZ3Sret_0 = texture2D(_ZZ3SsZh0004, gl_TexCoord[2].xy)*colorMult;
    gl_FragColor = _ZZ3Sret_0;
    return;
} // main end