Change default blending function

Remove the rendering of our star
This commit is contained in:
Alexander Bock
2015-02-24 14:27:45 +01:00
parent 7ba7622023
commit aa7e82eb7f
3 changed files with 7 additions and 6 deletions
+4 -1
View File
@@ -128,11 +128,14 @@ vec3 CartesianToSpherical(vec3 _cartesian) {
}
vec4 blend(vec4 src, vec4 dst) {
#if 0
vec4 o;
o.a = src.a + dst.a * (1.0f - src.a);
o.rgb = (src.rgb*src.a + dst.rgb*dst.a* (1.0f - src.a));
return o;
//return mix(src, dst, dst.a*(1.0f - src.a));
#else
return mix(src, dst, dst.a*(1.0f - src.a));
#endif
}
void blendStep(inout vec4 dst, in vec4 src, in float stepSize) {
-5
View File
@@ -74,7 +74,6 @@ void main() {
}
vec4 textureColor = texture(psfTexture, texCoord);
// textureColor.a = sqrt(textureColor.a);
vec4 fullColor = vec4(color.rgb, textureColor.a);
const float minPixelSize = 25;
@@ -89,10 +88,6 @@ void main() {
// float depth = 10000.0;
// gl_FragDepth = depth;
// Ease the workload on the abuffer a bit
if (textureColor.a < 0.1)
discard;
ABufferStruct_t frag = createGeometryFragment(fullColor, position, depth);
addToBuffer(frag);
}
+3
View File
@@ -55,6 +55,9 @@ uniform mat4 projection;
uniform float scaleFactor;
void main() {
if ((psc_position[0].x == 0.0) && (psc_position[0].y == 0.0) && (psc_position[0].z == 0.0))
return;
ge_brightness = vs_brightness[0];
ge_velocity = vs_velocity[0];
ge_speed = vs_speed[0];