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:
parent
1d877850b9
commit
10d7165c54
3 changed files with 6 additions and 6 deletions
|
@ -63,12 +63,6 @@
|
||||||
<negative-z>Aircraft/Generic/Effects/CubeMaps/buildings/D.png</negative-z>
|
<negative-z>Aircraft/Generic/Effects/CubeMaps/buildings/D.png</negative-z>
|
||||||
</images>
|
</images>
|
||||||
</texture>
|
</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 -->
|
||||||
<ambient-correction type="float"> 0.0 </ambient-correction>
|
<ambient-correction type="float"> 0.0 </ambient-correction>
|
||||||
<dirt-enabled type="int"> 0 </dirt-enabled>
|
<dirt-enabled type="int"> 0 </dirt-enabled>
|
||||||
|
|
|
@ -35,6 +35,8 @@ varying vec3 relPos;
|
||||||
varying float yprime_alt;
|
varying float yprime_alt;
|
||||||
varying float mie_angle;
|
varying float mie_angle;
|
||||||
|
|
||||||
|
varying float flogz;
|
||||||
|
|
||||||
uniform int colorMode;
|
uniform int colorMode;
|
||||||
uniform float hazeLayerAltitude;
|
uniform float hazeLayerAltitude;
|
||||||
uniform float terminator;
|
uniform float terminator;
|
||||||
|
@ -116,6 +118,7 @@ void main()
|
||||||
position = position + instancePosition.xyz;
|
position = position + instancePosition.xyz;
|
||||||
|
|
||||||
gl_Position = gl_ModelViewProjectionMatrix * vec4(position,1.0);
|
gl_Position = gl_ModelViewProjectionMatrix * vec4(position,1.0);
|
||||||
|
flogz = 1.0 + gl_Position.w;
|
||||||
|
|
||||||
// Texture coordinates are stored as:
|
// Texture coordinates are stored as:
|
||||||
// - a separate offset (x0, y0) for the wall (wtex0x, wtex0y), and roof (rtex0x, rtex0y)
|
// - a separate offset (x0, y0) for the wall (wtex0x, wtex0y), and roof (rtex0x, rtex0y)
|
||||||
|
|
|
@ -16,6 +16,8 @@ varying vec3 vViewVec;
|
||||||
varying vec3 vertVec;
|
varying vec3 vertVec;
|
||||||
varying vec3 reflVec;
|
varying vec3 reflVec;
|
||||||
|
|
||||||
|
varying float flogz;
|
||||||
|
|
||||||
varying float alpha;
|
varying float alpha;
|
||||||
|
|
||||||
attribute vec3 tangent;
|
attribute vec3 tangent;
|
||||||
|
@ -184,4 +186,5 @@ void main(void)
|
||||||
gl_FrontColor = vec4(1.0,1.0,1.0,1.0);
|
gl_FrontColor = vec4(1.0,1.0,1.0,1.0);
|
||||||
}
|
}
|
||||||
gl_Position = gl_ModelViewProjectionMatrix * vec4(rawpos,1.0);
|
gl_Position = gl_ModelViewProjectionMatrix * vec4(rawpos,1.0);
|
||||||
|
flogz = 1.0 + gl_Position.w;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue