mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-24 04:41:53 +00:00
14 lines
396 B
Text
14 lines
396 B
Text
|
|
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;
|
|
}
|