Fix a few GLSL errors as reported by glslangValidator
This commit is contained in:
parent
9ce7c3c747
commit
f705d0f908
4 changed files with 19 additions and 19 deletions
|
@ -196,7 +196,7 @@ if ((domain_x < 0.1) || (domain_x > 0.9)) {shapeTexel.a = 0.0;}
|
|||
domainTexel.rgb *= color_base.rgb;
|
||||
|
||||
vec4 birdTexel;
|
||||
birdTexel.rgb = domainTexel.rgb * light_diffuse;
|
||||
birdTexel.rgb = domainTexel.rgb * light_diffuse.rgb;
|
||||
birdTexel.a = domainTexel.a * shapeTexel.a * transmission;
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#version 120
|
||||
#version 150
|
||||
#extension GL_EXT_geometry_shader4 : enable
|
||||
|
||||
// Geometry shader that creates a prism from a terrain triangle,
|
||||
|
@ -7,28 +7,28 @@
|
|||
// A geometry shader should do as little computation as possible.
|
||||
|
||||
// See landmass-g.vert for a description of the inputs.
|
||||
varying in vec4 rawposIn[3];
|
||||
varying in vec3 NormalIn[3];
|
||||
varying in vec4 ecPosIn[3];
|
||||
varying in vec3 ecNormalIn[3];
|
||||
varying in vec3 VTangentIn[3];
|
||||
varying in vec3 VBinormalIn[3];
|
||||
varying in vec4 constantColorIn[3];
|
||||
in vec4 rawposIn[3];
|
||||
in vec3 NormalIn[3];
|
||||
in vec4 ecPosIn[3];
|
||||
in vec3 ecNormalIn[3];
|
||||
in vec3 VTangentIn[3];
|
||||
in vec3 VBinormalIn[3];
|
||||
in vec4 constantColorIn[3];
|
||||
|
||||
uniform float canopy_height;
|
||||
|
||||
// model position
|
||||
varying out vec4 rawpos;
|
||||
out vec4 rawpos;
|
||||
// eye position
|
||||
varying out vec4 ecPosition;
|
||||
out vec4 ecPosition;
|
||||
// eye space surface matrix
|
||||
varying out vec3 VNormal;
|
||||
varying out vec3 VTangent;
|
||||
varying out vec3 VBinormal;
|
||||
out vec3 VNormal;
|
||||
out vec3 VTangent;
|
||||
out vec3 VBinormal;
|
||||
// model normal
|
||||
varying out vec3 Normal;
|
||||
varying out vec4 constantColor;
|
||||
varying out float bump;
|
||||
out vec3 Normal;
|
||||
out vec4 constantColor;
|
||||
out float bump;
|
||||
|
||||
// Emit one vertex of the forest geometry.
|
||||
// parameters:
|
||||
|
|
|
@ -37,6 +37,6 @@ void main() {
|
|||
c = c * vec2( 1.0, fg_BufferSize.y / fg_BufferSize.x );
|
||||
float l = length(c);
|
||||
float f = smoothstep( 0.7, 1.1, l );
|
||||
color.rgb = (1 - f) * color.rgb;
|
||||
color.rgb = (1.0 - f) * color.rgb;
|
||||
gl_FragColor = color;
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ void main(void)
|
|||
fragColor.rgb = mix(hazeColor, finalColor.rgb, fogFactor );
|
||||
}
|
||||
else
|
||||
{fragColor.rgb = finalColor;}
|
||||
{fragColor.rgb = finalColor.rgb;}
|
||||
fragColor.a = mix(0.0, finalColor.a, fogFactor);
|
||||
|
||||
fragColor.rgb = filter_combined(fragColor.rgb);
|
||||
|
|
Loading…
Reference in a new issue