2022-05-14 01:58:00 +00:00
|
|
|
uniform_float uFactor {
|
|
|
|
step = 0.1;
|
|
|
|
min = 0.01;
|
|
|
|
max = 20.0;
|
|
|
|
default = 1.0;
|
2022-07-24 13:18:50 +00:00
|
|
|
display_name = "#{BuiltInShaders:DisplayDepthFactorName}";
|
|
|
|
description = "#{BuiltInShaders:DisplayDepthFactorDescription}";
|
2022-05-14 01:58:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fragment main {
|
|
|
|
|
|
|
|
omw_In vec2 omw_TexCoord;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
float depth = omw_GetDepth(omw_TexCoord);
|
|
|
|
float zNear = omw.near;
|
|
|
|
float zFar = omw.far;
|
|
|
|
omw_FragColor = vec4(vec3((2.0 * zNear) / (zFar + zNear - depth * (zFar - zNear))) * uFactor, 1.0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
technique {
|
|
|
|
passes = main;
|
2022-07-24 13:18:50 +00:00
|
|
|
description = "#{BuiltInShaders:DisplayDepthDescription}";
|
2022-05-14 01:58:00 +00:00
|
|
|
author = "OpenMW";
|
|
|
|
version = "1.0";
|
|
|
|
}
|