mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 17:35:45 +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);
|
position = vec4(proceduralData.position, 1.0);
|
||||||
vec4 posClip = cam._projection * (cam._view * position);
|
vec4 posClip = cam._projection * (cam._view * position);
|
||||||
float far = gl_DepthRange.far;
|
gl_FragDepth = 0.5 * (posClip.z / posClip.w + 1.0);
|
||||||
float near = gl_DepthRange.near;
|
|
||||||
gl_FragDepth = 0.5 * ((far - near) * posClip.z / posClip.w + near + far);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (emissiveAmount > 0.0) {
|
if (emissiveAmount > 0.0) {
|
||||||
|
|
|
@ -114,9 +114,7 @@ void main(void) {
|
||||||
roughness = proceduralData.roughness;
|
roughness = proceduralData.roughness;
|
||||||
|
|
||||||
vec4 posClip = cam._projection * posEye4;
|
vec4 posClip = cam._projection * posEye4;
|
||||||
float far = gl_DepthRange.far;
|
gl_FragDepth = 0.5 * (posClip.z / posClip.w + 1.0);
|
||||||
float near = gl_DepthRange.near;
|
|
||||||
gl_FragDepth = 0.5 * ((far - near) * posClip.z / posClip.w + near + far);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (emissiveAmount > 0.0) {
|
if (emissiveAmount > 0.0) {
|
||||||
|
|
Loading…
Reference in a new issue