mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-08 04:20:14 -05:00
Expose ambient intensity value for globes as a property
This commit is contained in:
@@ -55,6 +55,7 @@ uniform vec3 lightDirectionCameraSpace;
|
||||
|
||||
#if PERFORM_SHADING
|
||||
uniform float orenNayarRoughness;
|
||||
uniform float ambientIntensity;
|
||||
#endif // PERFORM_SHADING
|
||||
|
||||
#if SHADOW_MAPPING_ENABLED
|
||||
@@ -205,7 +206,8 @@ Fragment getFragment() {
|
||||
normal,
|
||||
lightDirectionCameraSpace,
|
||||
normalize(positionCameraSpace),
|
||||
orenNayarRoughness
|
||||
orenNayarRoughness,
|
||||
ambientIntensity
|
||||
);
|
||||
#endif // PERFORM_SHADING
|
||||
|
||||
|
||||
@@ -374,9 +374,9 @@ vec4 calculateNight(vec4 currentColor, vec2 uv, vec3 levelWeights,
|
||||
|
||||
vec4 calculateShadedColor(vec4 currentColor, vec3 ellipsoidNormalCameraSpace,
|
||||
vec3 lightDirectionCameraSpace, vec3 viewDirectionCameraSpace,
|
||||
float roughness)
|
||||
float roughness, float ambientIntensity)
|
||||
{
|
||||
vec3 shadedColor = currentColor.rgb * 0.05;
|
||||
vec3 shadedColor = currentColor.rgb * ambientIntensity;
|
||||
|
||||
vec3 n = normalize(ellipsoidNormalCameraSpace);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user