mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-01 00:09:58 -05:00
Additive blending for stars + add star parameters
This commit is contained in:
@@ -29,7 +29,10 @@ local object = {
|
||||
Type = "RenderableStars",
|
||||
File = speck .. "/stars.speck",
|
||||
Texture = textures .. "/halo.png",
|
||||
ColorMap = colorLUT .. "/colorbv.cmap"
|
||||
ColorMap = colorLUT .. "/colorbv.cmap",
|
||||
MagnitudeExponent = 19,
|
||||
BillboardSize = 30,
|
||||
Sharpness = 1.3
|
||||
},
|
||||
GuiPath = "/Milky Way/Stars"
|
||||
}
|
||||
|
||||
@@ -329,7 +329,9 @@ void RenderableStars::deinitializeGL() {
|
||||
}
|
||||
|
||||
void RenderableStars::render(const RenderData& data, RendererTasks&) {
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
|
||||
glDepthMask(false);
|
||||
|
||||
_program->activate();
|
||||
|
||||
glm::mat4 model =
|
||||
@@ -373,6 +375,7 @@ void RenderableStars::render(const RenderData& data, RendererTasks&) {
|
||||
_program->deactivate();
|
||||
|
||||
glDepthMask(true);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
}
|
||||
|
||||
void RenderableStars::update(const UpdateData&) {
|
||||
|
||||
Reference in New Issue
Block a user