|
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:
379 bytes
|
| Rev | Line | |
|---|
| [12091] | 1 | #version 100 |
|---|
| 2 | |
|---|
| 3 | precision highp int; |
|---|
| 4 | precision highp float; |
|---|
| 5 | |
|---|
| 6 | varying vec2 depth; |
|---|
| 7 | |
|---|
| 8 | void main() |
|---|
| 9 | { |
|---|
| 10 | #if LINEAR_RANGE |
|---|
| 11 | float finalDepth = depth.x; |
|---|
| 12 | #else |
|---|
| 13 | float finalDepth = depth.x / depth.y; |
|---|
| 14 | #endif |
|---|
| 15 | // just smear across all components |
|---|
| 16 | // therefore this one needs high individual channel precision |
|---|
| 17 | gl_FragColor.r = finalDepth;// = vec4(finalDepth, finalDepth, finalDepth, 1.0); |
|---|
| 18 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.