Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
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
Alchemy Viewer
Alchemy Viewer
Commits
b5917fbd
Commit
b5917fbd
authored
2 years ago
by
David Parks
Browse files
Options
Downloads
Patches
Plain Diff
DRTVWR-559 Reduce probe flashing and exposure flickering.
parent
9a03c819
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl
+5
-3
5 additions, 3 deletions
...wview/app_settings/shaders/class1/deferred/exposureF.glsl
indra/newview/llreflectionmapmanager.cpp
+13
-4
13 additions, 4 deletions
indra/newview/llreflectionmapmanager.cpp
with
18 additions
and
7 deletions
indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl
+
5
−
3
View file @
b5917fbd
...
@@ -55,13 +55,13 @@ void main()
...
@@ -55,13 +55,13 @@ void main()
vec3
col
;
vec3
col
;
vec2
nz
=
noiseVec
*
step
*
0
.
5
;
//
vec2 nz = noiseVec * step * 0.5;
for
(
float
x
=
start
;
x
<=
end
;
x
+=
step
)
for
(
float
x
=
start
;
x
<=
end
;
x
+=
step
)
{
{
for
(
float
y
=
start
;
y
<=
end
;
y
+=
step
)
for
(
float
y
=
start
;
y
<=
end
;
y
+=
step
)
{
{
vec2
tc
=
vec2
(
x
,
y
)
+
nz
;
vec2
tc
=
vec2
(
x
,
y
)
;
//
+ nz;
vec3
c
=
texture
(
diffuseRect
,
tc
).
rgb
+
texture
(
emissiveRect
,
tc
).
rgb
;
vec3
c
=
texture
(
diffuseRect
,
tc
).
rgb
+
texture
(
emissiveRect
,
tc
).
rgb
;
float
L
=
max
(
lum
(
c
),
0
.
25
);
float
L
=
max
(
lum
(
c
),
0
.
25
);
...
@@ -84,9 +84,11 @@ void main()
...
@@ -84,9 +84,11 @@ void main()
float
s
=
clamp
(
0
.
1
/
L
,
0
.
5
,
2
.
5
);
float
s
=
clamp
(
0
.
1
/
L
,
0
.
5
,
2
.
5
);
float
prev
=
texture
(
exposureMap
,
vec2
(
0
.
5
,
0
.
5
)).
r
;
float
prev
=
texture
(
exposureMap
,
vec2
(
0
.
5
,
0
.
5
)).
r
;
s
=
mix
(
prev
,
s
,
min
(
dt
*
2
.
0
,
0
.
04
));
s
=
mix
(
prev
,
s
,
min
(
dt
*
2
.
0
*
abs
(
prev
-
s
),
0
.
04
));
frag_color
=
vec4
(
s
,
s
,
s
,
dt
);
frag_color
=
vec4
(
s
,
s
,
s
,
dt
);
}
}
This diff is collapsed.
Click to expand it.
indra/newview/llreflectionmapmanager.cpp
+
13
−
4
View file @
b5917fbd
...
@@ -181,7 +181,11 @@ void LLReflectionMapManager::update()
...
@@ -181,7 +181,11 @@ void LLReflectionMapManager::update()
LLVector4a
d
;
LLVector4a
d
;
if
(
probe
->
mOccluded
)
if
(
probe
->
mComplete
)
{
probe
->
mFadeIn
=
llmin
((
F32
)
(
probe
->
mFadeIn
+
gFrameIntervalSeconds
),
1.
f
);
}
if
(
probe
->
mOccluded
&&
probe
->
mComplete
)
{
{
if
(
oldestOccluded
==
nullptr
)
if
(
oldestOccluded
==
nullptr
)
{
{
...
@@ -300,7 +304,7 @@ void LLReflectionMapManager::getReflectionMaps(std::vector<LLReflectionMap*>& ma
...
@@ -300,7 +304,7 @@ void LLReflectionMapManager::getReflectionMaps(std::vector<LLReflectionMap*>& ma
mProbes
[
i
]
->
mLastBindTime
=
gFrameTimeSeconds
;
// something wants to use this probe, indicate it's been requested
mProbes
[
i
]
->
mLastBindTime
=
gFrameTimeSeconds
;
// something wants to use this probe, indicate it's been requested
if
(
mProbes
[
i
]
->
mCubeIndex
!=
-
1
)
if
(
mProbes
[
i
]
->
mCubeIndex
!=
-
1
)
{
{
if
(
!
mProbes
[
i
]
->
mOccluded
)
if
(
!
mProbes
[
i
]
->
mOccluded
&&
mProbes
[
i
]
->
mComplete
)
{
{
mProbes
[
i
]
->
mProbeIndex
=
count
;
mProbes
[
i
]
->
mProbeIndex
=
count
;
maps
[
count
++
]
=
mProbes
[
i
];
maps
[
count
++
]
=
mProbes
[
i
];
...
@@ -385,6 +389,7 @@ S32 LLReflectionMapManager::allocateCubeIndex()
...
@@ -385,6 +389,7 @@ S32 LLReflectionMapManager::allocateCubeIndex()
S32
ret
=
mProbes
[
i
]
->
mCubeIndex
;
S32
ret
=
mProbes
[
i
]
->
mCubeIndex
;
mProbes
[
i
]
->
mCubeIndex
=
-
1
;
mProbes
[
i
]
->
mCubeIndex
=
-
1
;
mProbes
[
i
]
->
mCubeArray
=
nullptr
;
mProbes
[
i
]
->
mCubeArray
=
nullptr
;
mProbes
[
i
]
->
mComplete
=
false
;
return
ret
;
return
ret
;
}
}
}
}
...
@@ -435,6 +440,7 @@ void LLReflectionMapManager::doProbeUpdate()
...
@@ -435,6 +440,7 @@ void LLReflectionMapManager::doProbeUpdate()
mUpdatingFace
=
0
;
mUpdatingFace
=
0
;
if
(
isRadiancePass
())
if
(
isRadiancePass
())
{
{
mUpdatingProbe
->
mComplete
=
true
;
mUpdatingProbe
=
nullptr
;
mUpdatingProbe
=
nullptr
;
mRadiancePass
=
false
;
mRadiancePass
=
false
;
}
}
...
@@ -768,7 +774,10 @@ void LLReflectionMapManager::updateUniforms()
...
@@ -768,7 +774,10 @@ void LLReflectionMapManager::updateUniforms()
// for sphere probes, origin (xyz) and radius (w) of refmaps in clip space
// for sphere probes, origin (xyz) and radius (w) of refmaps in clip space
LLVector4
refSphere
[
LL_MAX_REFLECTION_PROBE_COUNT
];
LLVector4
refSphere
[
LL_MAX_REFLECTION_PROBE_COUNT
];
// extra parameters (currently only ambiance in .x)
// extra parameters
// x - irradiance scale
// y - radiance scale
// z - fade in
LLVector4
refParams
[
LL_MAX_REFLECTION_PROBE_COUNT
];
LLVector4
refParams
[
LL_MAX_REFLECTION_PROBE_COUNT
];
// indices used by probe:
// indices used by probe:
...
@@ -843,7 +852,7 @@ void LLReflectionMapManager::updateUniforms()
...
@@ -843,7 +852,7 @@ void LLReflectionMapManager::updateUniforms()
rpd
.
refIndex
[
count
][
3
]
=
-
rpd
.
refIndex
[
count
][
3
];
rpd
.
refIndex
[
count
][
3
]
=
-
rpd
.
refIndex
[
count
][
3
];
}
}
rpd
.
refParams
[
count
].
set
(
llmax
(
minimum_ambiance
,
refmap
->
getAmbiance
())
*
ambscale
,
radscale
,
0.
f
,
0.
f
);
rpd
.
refParams
[
count
].
set
(
llmax
(
minimum_ambiance
,
refmap
->
getAmbiance
())
*
ambscale
,
radscale
,
refmap
->
mFadeIn
,
0.
f
);
S32
ni
=
nc
;
// neighbor ("index") - index into refNeighbor to write indices for current reflection probe's neighbors
S32
ni
=
nc
;
// neighbor ("index") - index into refNeighbor to write indices for current reflection probe's neighbors
{
{
...
...
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