Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
XDG Integration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
JennaHuntsman
XDG Integration
Commits
aeff11fb
Commit
aeff11fb
authored
4 years ago
by
Michael Pohoreski
Browse files
Options
Downloads
Plain Diff
Merged in SL-12978 (pull request #180)
SL-12978 Approved-by: Dave Houlton
parents
6f388f22
9f0225ab
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/llinventory/llsettingssky.cpp
+3
-0
3 additions, 0 deletions
indra/llinventory/llsettingssky.cpp
indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl
+12
-15
12 additions, 15 deletions
..._settings/shaders/class1/windlight/atmosphericsFuncs.glsl
with
15 additions
and
15 deletions
indra/llinventory/llsettingssky.cpp
+
3
−
0
View file @
aeff11fb
...
...
@@ -1295,6 +1295,9 @@ void LLSettingsSky::clampColor(LLColor3& color, F32 gamma, F32 scale) const
color
=
linear
;
}
// Similar/Shared Algorithms:
// indra\llinventory\llsettingssky.cpp -- LLSettingsSky::calculateLightSettings()
// indra\newview\app_settings\shaders\class1\windlight\atmosphericsFuncs.glsl -- calcAtmosphericVars()
void
LLSettingsSky
::
calculateLightSettings
()
const
{
// Initialize temp variables
...
...
This diff is collapsed.
Click to expand it.
indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl
+
12
−
15
View file @
aeff11fb
...
...
@@ -47,13 +47,13 @@ float getAmbientClamp()
}
void
calcAtmosphericVars
(
vec3
inPositionEye
,
vec3
light_dir
,
float
ambFactor
,
out
vec3
sunlit
,
out
vec3
amblit
,
out
vec3
additive
,
out
vec3
atten
,
bool
use_ao
)
{
void
calcAtmosphericVars
(
vec3
inPositionEye
,
vec3
light_dir
,
float
ambFactor
,
out
vec3
sunlit
,
out
vec3
amblit
,
out
vec3
additive
,
out
vec3
atten
,
bool
use_ao
)
{
vec3
P
=
inPositionEye
;
//(TERRAIN) limit altitude
if
(
P
.
y
>
max_y
)
P
*=
(
max_y
/
P
.
y
);
if
(
P
.
y
<
-
max_y
)
P
*=
(
-
max_y
/
P
.
y
);
if
(
P
.
y
>
max_y
)
P
*=
(
max_y
/
P
.
y
);
if
(
P
.
y
<
-
max_y
)
P
*=
(
-
max_y
/
P
.
y
);
vec3
tmpLightnorm
=
lightnorm
.
xyz
;
...
...
@@ -81,13 +81,8 @@ void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, ou
haze_weight
=
vec4
(
haze_density
)
/
temp1
;
//(TERRAIN) compute sunlight from lightnorm only (for short rays like terrain)
temp2
.
y
=
max
(
0
.
0
,
tmpLightnorm
.
y
);
if
(
abs
(
temp2
.
y
)
>
0
.
000001
f
)
{
temp2
.
y
=
1
.
/
abs
(
temp2
.
y
);
}
temp2
.
y
=
max
(
0
.
0000001
f
,
temp2
.
y
);
sunlight
*=
exp
(
-
light_atten
*
temp2
.
y
);
// SL-12978: temp2.y = 1; optimized away
sunlight
*=
exp
(
-
light_atten
);
// main atmospheric scattering line integral
temp2
.
z
=
Plen
*
dens_mul
;
...
...
@@ -141,11 +136,13 @@ void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, ou
tmpAmbient
=
vec4
(
mix
(
ssao_effect_mat
*
tmpAmbient
.
rgb
,
tmpAmbient
.
rgb
,
ambFactor
),
tmpAmbient
.
a
);
}
// Similar/Shared Algorithms:
// indra\llinventory\llsettingssky.cpp -- LLSettingsSky::calculateLightSettings()
// indra\newview\app_settings\shaders\class1\windlight\atmosphericsFuncs.glsl -- calcAtmosphericVars()
//haze color
additive
=
vec3
(
blue_horizon
*
blue_weight
*
(
sunlight
*
(
1
.
-
cloud_shadow
)
+
tmpAmbient
)
+
(
haze_horizon
*
haze_weight
)
*
(
sunlight
*
(
1
.
-
cloud_shadow
)
*
temp2
.
x
+
tmpAmbient
));
vec3
cs
=
sunlight
.
rgb
*
(
1
.
-
cloud_shadow
);
additive
=
(
blue_horizon
.
rgb
*
blue_weight
.
rgb
)
*
(
cs
+
tmpAmbient
.
rgb
)
+
(
haze_horizon
*
haze_weight
.
rgb
)
*
(
cs
*
temp2
.
x
+
tmpAmbient
.
rgb
);
//brightness of surface both sunlight and ambient
sunlit
=
sunlight
.
rgb
*
0
.
5
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment