mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 03:00:58 -06:00
New fast AA for lines is working.
This commit is contained in:
@@ -178,7 +178,7 @@ RenderableTrail::Appearance::Appearance()
|
||||
, lineColor(LineColorInfo, glm::vec3(1.0f, 1.0f, 0.f), glm::vec3(0.f), glm::vec3(1.f))
|
||||
, useLineFade(EnableFadeInfo, true)
|
||||
, lineFade(FadeInfo, 1.f, 0.f, 30.f)
|
||||
, lineWidth(LineWidthInfo, 2.f, 1.f, 20.f)
|
||||
, lineWidth(LineWidthInfo, 10.f, 1.f, 20.f)
|
||||
, pointSize(PointSizeInfo, 1, 1, 64)
|
||||
, renderingModes(
|
||||
RenderingModeInfo,
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
in float vs_positionDepth;
|
||||
in vec4 vs_gPosition;
|
||||
in float fade;
|
||||
in vec2 mathLine;
|
||||
noperspective in vec2 mathLine;
|
||||
|
||||
uniform vec3 color;
|
||||
uniform int renderPhase;
|
||||
@@ -63,18 +63,14 @@ Fragment getFragment() {
|
||||
|
||||
double distanceCenter = length(mathLine - vec2(gl_FragCoord.xy));
|
||||
double dLW = double(lineWidth);
|
||||
float blendFactor = 1.5;
|
||||
float blendFactor = 20;
|
||||
|
||||
if (distanceCenter > dLW) {
|
||||
frag.color = vec4(1.0, 0.0, 0.0, 1.0);
|
||||
//frag.color.a = 0;
|
||||
frag.color.a = 0.0;
|
||||
} else {
|
||||
frag.color.a *= pow(float((dLW - distanceCenter) / dLW), blendFactor);
|
||||
//frag.color.a = 1.0;
|
||||
}
|
||||
|
||||
// if (distanceCenter > 3.0)
|
||||
// frag.color = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
|
||||
frag.gPosition = vs_gPosition;
|
||||
|
||||
// There is no normal here
|
||||
|
||||
Reference in New Issue
Block a user