mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-14 05:26:32 +02:00
remove gl_DepthRange
This commit is contained in:
parent
df6fbefc31
commit
bf704c2d0d
2 changed files with 2 additions and 6 deletions
|
@ -103,9 +103,7 @@ void main(void) {
|
|||
|
||||
position = vec4(proceduralData.position, 1.0);
|
||||
vec4 posClip = cam._projection * (cam._view * position);
|
||||
float far = gl_DepthRange.far;
|
||||
float near = gl_DepthRange.near;
|
||||
gl_FragDepth = 0.5 * ((far - near) * posClip.z / posClip.w + near + far);
|
||||
gl_FragDepth = 0.5 * (posClip.z / posClip.w + 1.0);
|
||||
#endif
|
||||
|
||||
if (emissiveAmount > 0.0) {
|
||||
|
|
|
@ -114,9 +114,7 @@ void main(void) {
|
|||
roughness = proceduralData.roughness;
|
||||
|
||||
vec4 posClip = cam._projection * posEye4;
|
||||
float far = gl_DepthRange.far;
|
||||
float near = gl_DepthRange.near;
|
||||
gl_FragDepth = 0.5 * ((far - near) * posClip.z / posClip.w + near + far);
|
||||
gl_FragDepth = 0.5 * (posClip.z / posClip.w + 1.0);
|
||||
#endif
|
||||
|
||||
if (emissiveAmount > 0.0) {
|
||||
|
|
Loading…
Reference in a new issue