Fix shader-based buildings on AMD/macOS
This commit is contained in:
parent
e70f096654
commit
9355d464c1
1 changed files with 5 additions and 1 deletions
|
@ -34,6 +34,8 @@ uniform int color_is_position;
|
|||
// void fog_Func(int type);
|
||||
////////////////////////////
|
||||
|
||||
void setupShadows(vec4 eyeSpacePos);
|
||||
|
||||
void rotationMatrixPR(in float sinRx, in float cosRx, in float sinRy, in float cosRy, out mat4 rotmat)
|
||||
{
|
||||
rotmat = mat4( cosRy , sinRx * sinRy , cosRx * sinRy, 0.0,
|
||||
|
@ -72,7 +74,7 @@ void main(void)
|
|||
float sr = sin(6.28 * attr1.x);
|
||||
float cr = cos(6.28 * attr1.x);
|
||||
|
||||
vec3 rawpos = gl_Vertex.xyz;
|
||||
rawpos = gl_Vertex.xyz;
|
||||
// Adjust the very top of the roof to match the rooftop scaling. This shapes
|
||||
// the rooftop - gambled, gabled etc. These vertices are identified by gl_Color.z
|
||||
rawpos.x = (1.0 - gl_Color.z) * rawpos.x + gl_Color.z * ((rawpos.x + 0.5) * attr3.z - 0.5);
|
||||
|
@ -180,4 +182,6 @@ void main(void)
|
|||
* (gl_LightModel.ambient + gl_LightSource[0].ambient);
|
||||
|
||||
gl_Position = gl_ModelViewProjectionMatrix * vec4(rawpos,1.0);
|
||||
|
||||
setupShadows(ecPosition);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue