mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-27 22:40:41 -05:00
Fixed issue with alpha channel
+ changed color table width
This commit is contained in:
@@ -494,6 +494,9 @@ void RenderableStreamNodes::initializeGL() {
|
||||
glGenBuffers(1, &_vertexFilteringBuffer);
|
||||
glGenBuffers(1, &_vertexindexBuffer);
|
||||
glGenBuffers(1, &_vertexStreamNumberBuffer);
|
||||
|
||||
// Needed for alpha transparency
|
||||
setRenderBin(Renderable::RenderBin::Transparent);
|
||||
}
|
||||
|
||||
void RenderableStreamNodes::loadNodeData() {
|
||||
@@ -577,7 +580,6 @@ void RenderableStreamNodes::loadNodeData() {
|
||||
}
|
||||
createStreamnumberVector();
|
||||
|
||||
|
||||
}
|
||||
void RenderableStreamNodes::createStreamnumberVector() {
|
||||
int nPoints = 1999;
|
||||
|
||||
@@ -154,7 +154,7 @@ private:
|
||||
std::unique_ptr<ghoul::opengl::ProgramObject> _shaderProgram;
|
||||
// Transfer function used to color lines when _pColorMethod is set to BY_FLUX_VALUE
|
||||
std::unique_ptr<TransferFunction> _transferFunction;
|
||||
// Transfer function used to color lines /////////////
|
||||
// Transfer function used to color line near Earth
|
||||
std::unique_ptr<TransferFunction> _transferFunctionEarth;
|
||||
|
||||
// ------------------------------------ VECTORS ----------------------------------- //
|
||||
|
||||
@@ -198,7 +198,7 @@ void DecidehowtoshowClosetoEarth(){
|
||||
}
|
||||
if(EnhanceMethod == 1){
|
||||
vec4 fluxColor = getTransferFunctionColor(colorTable);
|
||||
vs_color = vec4(fluxColor.xyz, fluxColor.w);
|
||||
vs_color = vec4(fluxColor.xyz, fluxColor.a);
|
||||
}
|
||||
if(EnhanceMethod == 2){
|
||||
if(!firstrender && vs_color.x != 0 && vs_color.y != 0){
|
||||
@@ -214,13 +214,13 @@ void DecidehowtoshowClosetoEarth(){
|
||||
}
|
||||
else{
|
||||
vec4 fluxColor3 = getTransferFunctionColor(colorTable);
|
||||
vs_color = vec4(fluxColor3.xyz, fluxColor3.w);
|
||||
vs_color = vec4(fluxColor3.xyz, fluxColor3.a);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(EnhanceMethod == 4){
|
||||
vec4 fluxColor3 = getTransferFunctionColor(colorTable);
|
||||
vs_color = vec4(fluxColor3.xyz, fluxColor3.w);
|
||||
vs_color = vec4(fluxColor3.xyz, fluxColor3.a);
|
||||
|
||||
float tempR2 = rValue + 0.4;
|
||||
if(tempR2 > 1.5){
|
||||
@@ -234,7 +234,7 @@ void CheckdistanceMethod() {
|
||||
//Enhance by distance to Earth
|
||||
if(EnhanceMethod == 1 || EnhanceMethod == 4){
|
||||
vec4 fluxColor2 = getTransferFunctionColor(colorTableEarth);
|
||||
vs_color = vec4(fluxColor2.xyz, fluxColor2.w);
|
||||
vs_color = vec4(fluxColor2.xyz, fluxColor2.a);
|
||||
}
|
||||
if(DistanceMethod == 0){
|
||||
if(distance(earthPos, in_position) < DistanceThreshold){
|
||||
@@ -277,7 +277,7 @@ void main() {
|
||||
vec4 fluxColor = getTransferFunctionColor(colorTable);
|
||||
|
||||
if(fluxValue > thresholdFlux){
|
||||
vs_color = vec4(fluxColor.xyz, fluxColor.w);
|
||||
vs_color = vec4(fluxColor.xyz, fluxColor.a);
|
||||
gl_PointSize = nodeSizeLargerFlux;
|
||||
}
|
||||
else{
|
||||
|
||||
Reference in New Issue
Block a user