Revert "Impostor and geometry changes for 3D clouds."
This reverts commit 242d9f6c5655ff96dbc9047a135cc62998ddfcb2.
This commit is contained in:
parent
0c4b68a884
commit
bb2786ce24
3 changed files with 18 additions and 10 deletions
|
@ -57,6 +57,10 @@
|
||||||
<name>usrAttr2</name>
|
<name>usrAttr2</name>
|
||||||
<index>11</index>
|
<index>11</index>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<attribute>
|
||||||
|
<name>usrAttr3</name>
|
||||||
|
<index>12</index>
|
||||||
|
</attribute>
|
||||||
</program>
|
</program>
|
||||||
<uniform>
|
<uniform>
|
||||||
<name>baseTexture</name>
|
<name>baseTexture</name>
|
||||||
|
|
|
@ -6,7 +6,6 @@ void main(void)
|
||||||
vec4 base = texture2D( baseTexture, gl_TexCoord[0].st);
|
vec4 base = texture2D( baseTexture, gl_TexCoord[0].st);
|
||||||
vec4 finalColor = base * gl_Color;
|
vec4 finalColor = base * gl_Color;
|
||||||
gl_FragColor.rgb = mix(gl_Fog.color.rgb, finalColor.rgb, fogFactor );
|
gl_FragColor.rgb = mix(gl_Fog.color.rgb, finalColor.rgb, fogFactor );
|
||||||
//gl_FragColor.a = mix(0.0, finalColor.a, fogFactor);
|
gl_FragColor.a = mix(0.0, finalColor.a, fogFactor);
|
||||||
gl_FragColor.a = finalColor.a;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,16 +7,21 @@ uniform float range; // From /sim/rendering/clouds3d-vis-range
|
||||||
|
|
||||||
attribute vec3 usrAttr1;
|
attribute vec3 usrAttr1;
|
||||||
attribute vec3 usrAttr2;
|
attribute vec3 usrAttr2;
|
||||||
|
attribute vec3 usrAttr3;
|
||||||
|
|
||||||
float shade_factor = usrAttr1.g;
|
float textureIndexX = usrAttr1.r;
|
||||||
float cloud_height = usrAttr1.b;
|
float textureIndexY = usrAttr1.g;
|
||||||
float bottom_factor = usrAttr2.r;
|
float wScale = usrAttr1.b;
|
||||||
float middle_factor = usrAttr2.g;
|
float hScale = usrAttr2.r;
|
||||||
float top_factor = usrAttr2.b;
|
float shade_factor = usrAttr2.g;
|
||||||
|
float cloud_height = usrAttr2.b;
|
||||||
|
float bottom_factor = usrAttr3.r;
|
||||||
|
float middle_factor = usrAttr3.g;
|
||||||
|
float top_factor = usrAttr3.b;
|
||||||
|
|
||||||
void main(void)
|
void main(void)
|
||||||
{
|
{
|
||||||
gl_TexCoord[0] = gl_MultiTexCoord0;
|
gl_TexCoord[0] = gl_MultiTexCoord0 + vec4(textureIndexX, textureIndexY, 0.0, 0.0);
|
||||||
vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0);
|
vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0);
|
||||||
vec4 l = gl_ModelViewMatrixInverse * vec4(0.0,0.0,1.0,1.0);
|
vec4 l = gl_ModelViewMatrixInverse * vec4(0.0,0.0,1.0,1.0);
|
||||||
vec3 u = normalize(ep.xyz - l.xyz);
|
vec3 u = normalize(ep.xyz - l.xyz);
|
||||||
|
@ -31,8 +36,8 @@ void main(void)
|
||||||
// scaling in the homogeneous component of pos.
|
// scaling in the homogeneous component of pos.
|
||||||
gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
|
gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
|
||||||
gl_Position.xyz = gl_Vertex.x * u;
|
gl_Position.xyz = gl_Vertex.x * u;
|
||||||
gl_Position.xyz += gl_Vertex.y * r;
|
gl_Position.xyz += gl_Vertex.y * r * wScale;
|
||||||
gl_Position.xyz += gl_Vertex.z * w;
|
gl_Position.xyz += gl_Vertex.z * w * hScale;
|
||||||
// Apply Z scaling to allow sprites to be squashed in the z-axis
|
// Apply Z scaling to allow sprites to be squashed in the z-axis
|
||||||
gl_Position.z = gl_Position.z * gl_Color.w;
|
gl_Position.z = gl_Position.z * gl_Color.w;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue