|
Revision 7347
(checked in by robert, 1 year ago)
|
Added depth peeling shaders from Steffen Frey
|
| Line | |
|---|
| 1 |
/* |
|---|
| 2 |
Steffen Frey |
|---|
| 3 |
Fachpraktikum Graphik-Programmierung 2007 |
|---|
| 4 |
Institut fuer Visualisierung und Interaktive Systeme |
|---|
| 5 |
Universitaet Stuttgart |
|---|
| 6 |
*/ |
|---|
| 7 |
|
|---|
| 8 |
uniform float znear; |
|---|
| 9 |
uniform float zfar; |
|---|
| 10 |
|
|---|
| 11 |
//depth in camera space |
|---|
| 12 |
varying float depthInCamera; |
|---|
| 13 |
|
|---|
| 14 |
void main( void ) |
|---|
| 15 |
{ |
|---|
| 16 |
vec4 position = gl_ModelViewMatrix * gl_Vertex; |
|---|
| 17 |
depthInCamera = (abs(position.z) - znear) / (zfar - znear); |
|---|
| 18 |
gl_Position = ftransform(); |
|---|
| 19 |
gl_FrontColor = gl_Color; |
|---|
| 20 |
} |
|---|