diff --git a/openspace-data b/openspace-data index f49cff87e8..bda0f235f0 160000 --- a/openspace-data +++ b/openspace-data @@ -1 +1 @@ -Subproject commit f49cff87e8a4c164b6458749c7df8ba01f8e0b0a +Subproject commit bda0f235f070e364ce66b0fa3aa25e8ae51b5f5e diff --git a/shaders/modules/stars/star_fs.glsl b/shaders/modules/stars/star_fs.glsl index 211d290499..b3e25727c4 100644 --- a/shaders/modules/stars/star_fs.glsl +++ b/shaders/modules/stars/star_fs.glsl @@ -73,8 +73,7 @@ void main() { break; } - - framebuffer_output_color = texture(psfTexture, texCoord) * color; + vec4 fullColor = texture(psfTexture, texCoord) * color; // framebuffer_output_color = vec4(vs_position.rgb, 1.0); @@ -83,12 +82,14 @@ void main() { // framebuffer_output_color = vec4(vec3(abs(ge_brightness.z)), 1.0); vec4 position = vs_position; - float depth = pscDepth(position); - gl_FragDepth = depth; + // This has to be fixed when the scale graph is in place ---abock + // float depth = pscDepth(position); + float depth = 10000.0; + // gl_FragDepth = depth; - //ABufferStruct_t frag = createGeometryFragment(vec4(1,0,0,1), position, depth); - //ABufferStruct_t frag = createGeometryFragment(diffuse, position, depth); - //addToBuffer(frag); + ABufferStruct_t frag = createGeometryFragment(fullColor, position, depth); + addToBuffer(frag); + // framebuffer_output_color = fullColor; //discard; diff --git a/shaders/modules/stars/star_ge.glsl b/shaders/modules/stars/star_ge.glsl index 7f2a542c22..f5a85437c6 100644 --- a/shaders/modules/stars/star_ge.glsl +++ b/shaders/modules/stars/star_ge.glsl @@ -80,10 +80,8 @@ void main() { // p = vec4(vec3(apparent), 1.0); - vec4 P = gl_in[0].gl_Position; - // check everything below this ---abock - float weight = 0.00001f; // otherwise this takes over. + float weight = 0.000005f; // otherwise this takes over. double depth = pc[0] * pow(10, pc[1]); depth *= pow(apparent,3); @@ -92,10 +90,10 @@ void main() { // EMIT QUAD for(int i = 0; i < 4; i++){ - vec4 p1 = P; + vec4 p1 = gl_in[0].gl_Position; p1.xy += vec2(modifiedSpriteSize * (corners[i] - vec2(0.5))); vs_position = p1; - gl_Position = projection * p1; + gl_Position = projection * p1; // gl_Position = z_normalization(projection * p1); texCoord = corners[i]; // p = psc_position[0]; diff --git a/src/rendering/stars/renderablestars.cpp b/src/rendering/stars/renderablestars.cpp index bc5a8d82fc..5a7dc598f5 100644 --- a/src/rendering/stars/renderablestars.cpp +++ b/src/rendering/stars/renderablestars.cpp @@ -199,9 +199,7 @@ void RenderableStars::render(const RenderData& data) { glBindVertexArray(_vao); const GLsizei nStars = static_cast(_fullData.size() / _nValuesPerStar); - //glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); - glDrawArrays(GL_POINTS, 0, nStars); - //glDisable(GL_VERTEX_PROGRAM_POINT_SIZE); + glDrawArrays(GL_POINTS, 0, nStars); glBindVertexArray(0); _program->setIgnoreUniformLocationError(false);