1
0
Fork 0

Set correct depth ranges for randing buildings

Unlikely that we'll enable shadows for them, but they
should have logarithmic depth set anyway.
This commit is contained in:
Stuart Buchanan 2020-04-13 17:56:49 +01:00
parent 1d877850b9
commit 10d7165c54
3 changed files with 6 additions and 6 deletions

View file

@ -63,12 +63,6 @@
<negative-z>Aircraft/Generic/Effects/CubeMaps/buildings/D.png</negative-z>
</images>
</texture>
<texture n="6">
<!-- instance information from shader -->
<type>2d</type>
<wrap-s>clamp</wrap-s>
<wrap-t>clamp</wrap-t>
</texture>
<!--Ambient correction -->
<ambient-correction type="float"> 0.0 </ambient-correction>
<dirt-enabled type="int"> 0 </dirt-enabled>

View file

@ -35,6 +35,8 @@ varying vec3 relPos;
varying float yprime_alt;
varying float mie_angle;
varying float flogz;
uniform int colorMode;
uniform float hazeLayerAltitude;
uniform float terminator;
@ -116,6 +118,7 @@ void main()
position = position + instancePosition.xyz;
gl_Position = gl_ModelViewProjectionMatrix * vec4(position,1.0);
flogz = 1.0 + gl_Position.w;
// Texture coordinates are stored as:
// - a separate offset (x0, y0) for the wall (wtex0x, wtex0y), and roof (rtex0x, rtex0y)

View file

@ -16,6 +16,8 @@ varying vec3 vViewVec;
varying vec3 vertVec;
varying vec3 reflVec;
varying float flogz;
varying float alpha;
attribute vec3 tangent;
@ -184,4 +186,5 @@ void main(void)
gl_FrontColor = vec4(1.0,1.0,1.0,1.0);
}
gl_Position = gl_ModelViewProjectionMatrix * vec4(rawpos,1.0);
flogz = 1.0 + gl_Position.w;
}