mirror of https://github.com/ZDoom/qzdoom.git
15 lines
396 B
Plaintext
15 lines
396 B
Plaintext
|
|
out vec4 pixelpos;
|
|
|
|
void main()
|
|
{
|
|
// perform exactly the same relevant steps as in the main shader to ensure matching results (that also means including the model matrix here!)
|
|
vec4 worldcoord = ModelMatrix * gl_Vertex;
|
|
vec4 eyeCoordPos = ViewMatrix * worldcoord;
|
|
|
|
pixelpos.xyz = worldcoord.xyz;
|
|
pixelpos.w = -eyeCoordPos.z/eyeCoordPos.w;
|
|
|
|
gl_Position = ProjectionMatrix * eyeCoordPos;
|
|
}
|