|
Last change
on this file since 12091 was
12091,
checked in by wiesep, 7 years ago
|
|
Updated programs and adjusted Material to work with GLSL>150
|
|
File size:
413 bytes
|
| Line | |
|---|
| 1 | #version 100 |
|---|
| 2 | |
|---|
| 3 | precision mediump int; |
|---|
| 4 | precision mediump float; |
|---|
| 5 | |
|---|
| 6 | varying vec2 oDepth; |
|---|
| 7 | uniform mat4 worldViewProjMatrix; |
|---|
| 8 | attribute vec4 vertex; |
|---|
| 9 | |
|---|
| 10 | void main() |
|---|
| 11 | { |
|---|
| 12 | // This is the view space position |
|---|
| 13 | gl_Position = worldViewProjMatrix * vertex; |
|---|
| 14 | |
|---|
| 15 | // Depth info for the fragment. |
|---|
| 16 | oDepth.x = gl_Position.z; |
|---|
| 17 | oDepth.y = gl_Position.w; |
|---|
| 18 | |
|---|
| 19 | // Clamp z to zero. seem to do the trick. :-/ |
|---|
| 20 | //oPosition.z = max(oPosition.z, 0); |
|---|
| 21 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.