mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-24 22:09:10 -06:00
Fix coding style issues
This commit is contained in:
@@ -85,8 +85,9 @@ Fragment getFragment() {
|
||||
vec4 diffuse = mix(colorFwrd * colorMult, colorBckwrd * colorMult, lerpFactor);
|
||||
diffuse.a = colorFilterValue * transparency.a;
|
||||
float colorValue = length(diffuse.rgb) / 0.57735026919;
|
||||
if (colorValue < 0.1)
|
||||
if (colorValue < 0.1) {
|
||||
discard;
|
||||
}
|
||||
|
||||
// shadow == 1.0 means it is not in shadow
|
||||
float shadow = 1.0;
|
||||
|
||||
@@ -125,4 +125,4 @@ Fragment getFragment() {
|
||||
frag.gNormal = vec4(normal, 1.0);
|
||||
|
||||
return frag;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,4 +50,4 @@ void main() {
|
||||
shadowCoords = vec4(shadowMatrix * dvec4(in_position, 0.0, 1.0));
|
||||
vs_screenSpaceDepth = positionClipSpaceZNorm.w;
|
||||
gl_Position = positionClipSpaceZNorm;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -562,7 +562,8 @@ void RingsComponent::draw(const RenderData& data,
|
||||
glEnablei(GL_BLEND, 0);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
_shader->setUniform(
|
||||
_uniformCache.modelViewProjectionMatrix,
|
||||
modelViewProjectionTransform
|
||||
@@ -880,14 +881,14 @@ void RingsComponent::compileShadowShader() {
|
||||
|
||||
try {
|
||||
global::renderEngine->removeRenderProgram(_shader.get());
|
||||
/* _shader = global::renderEngine->buildRenderProgram(
|
||||
"RingsProgram",
|
||||
absPath("${MODULE_GLOBEBROWSING}/shaders/rings_vs.glsl"),
|
||||
absPath("${MODULE_GLOBEBROWSING}/shaders/rings_fs.glsl"),
|
||||
dict
|
||||
);
|
||||
// _shader = global::renderEngine->buildRenderProgram(
|
||||
// "RingsProgram",
|
||||
// absPath("${MODULE_GLOBEBROWSING}/shaders/rings_vs.glsl"),
|
||||
// absPath("${MODULE_GLOBEBROWSING}/shaders/rings_fs.glsl"),
|
||||
// dict
|
||||
// );
|
||||
|
||||
ghoul::opengl::updateUniformLocations(*_shader, _uniformCache, UniformNames);*/
|
||||
// ghoul::opengl::updateUniformLocations(*_shader, _uniformCache, UniformNames);
|
||||
|
||||
// Uses multiple textures for the Rings
|
||||
// See https://bjj.mmedia.is/data/s_rings/index.html for theory behind it
|
||||
@@ -905,7 +906,8 @@ void RingsComponent::compileShadowShader() {
|
||||
UniformNamesAdvancedRings
|
||||
);
|
||||
}
|
||||
else { // Uses simple texture for the Rings
|
||||
else {
|
||||
// Uses simple texture for the Rings
|
||||
_shader = global::renderEngine->buildRenderProgram(
|
||||
"RingsProgram",
|
||||
absPath("${MODULE_GLOBEBROWSING}/shaders/rings_vs.glsl"),
|
||||
|
||||
Reference in New Issue
Block a user