Last change
on this file since 1693 was
1574,
checked in by sam, 9 years ago
|
tutorial: start working on an FBO example.
|
File size:
543 bytes
|
Line | |
---|
1 | -- GLSL.Vert -- |
---|
2 | |
---|
3 | #version 120 |
---|
4 | |
---|
5 | void main() |
---|
6 | { |
---|
7 | gl_Position = gl_Vertex; |
---|
8 | gl_TexCoord[0] = gl_MultiTexCoord0; |
---|
9 | } |
---|
10 | |
---|
11 | -- GLSL.Frag -- |
---|
12 | |
---|
13 | #version 120 |
---|
14 | |
---|
15 | uniform sampler2D texture; |
---|
16 | |
---|
17 | void main(void) |
---|
18 | { |
---|
19 | gl_FragColor = vec4(texture2D(texture, gl_TexCoord[0].xy).xyz, 1.0); |
---|
20 | } |
---|
21 | |
---|
22 | -- HLSL.Vert -- |
---|
23 | |
---|
24 | void main(float2 in_Position : POSITION, |
---|
25 | out float4 out_Position : POSITION) |
---|
26 | { |
---|
27 | out_Position = float4(in_Position, 0.0, 1.0); |
---|
28 | } |
---|
29 | |
---|
30 | -- HLSL.Frag -- |
---|
31 | |
---|
32 | void main(out float4 out_FragColor : COLOR) |
---|
33 | { |
---|
34 | out_FragColor = float4(0.7, 0.2, 0.5, 1.0); |
---|
35 | } |
---|
36 | |
---|
Note: See
TracBrowser
for help on using the repository browser.