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
38a6f3b0
Commit
38a6f3b0
authored
6 years ago
by
Graham Linden
Browse files
Options
Downloads
Patches
Plain Diff
SL-9966 fix cloud noise map bindings when current and next are identical.
parent
536799d0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/lldrawpoolwlsky.cpp
+30
-2
30 additions, 2 deletions
indra/newview/lldrawpoolwlsky.cpp
with
30 additions
and
2 deletions
indra/newview/lldrawpoolwlsky.cpp
+
30
−
2
View file @
38a6f3b0
...
...
@@ -399,13 +399,41 @@ void LLDrawPoolWLSky::renderSkyCloudsAdvanced(const LLVector3& camPosLocal, F32
{
LLGLSPipelineBlendSkyBox
pipeline
(
true
,
true
);
LLSettingsSky
::
ptr_t
psky
=
LLEnvironment
::
instance
().
getCurrentSky
();
cloudshader
->
bind
();
S32
cloud_channel
=
cloudshader
->
bindTexture
(
LLShaderMgr
::
CLOUD_NOISE_MAP
,
gSky
.
mVOSkyp
->
getCloudNoiseTex
());
LLPointer
<
LLViewerTexture
>
cloud_noise
=
gSky
.
mVOSkyp
->
getCloudNoiseTex
();
LLPointer
<
LLViewerTexture
>
cloud_noise_next
=
gSky
.
mVOSkyp
->
getCloudNoiseTexNext
();
S32
cloud_channel
=
cloudshader
->
bindTexture
(
LLShaderMgr
::
CLOUD_NOISE_MAP
,
cloud_noise
);
S32
cloud_next_channel
=
cloudshader
->
bindTexture
(
LLShaderMgr
::
CLOUD_NOISE_MAP_NEXT
,
gSky
.
mVOSkyp
->
getCloudNoiseTexNext
());
(
void
)
cloud_channel
,
(
void
)
cloud_next_channel
;
LLSettingsSky
::
ptr_t
psky
=
LLEnvironment
::
instance
().
getCurrentSky
();
gGL
.
getTexUnit
(
0
)
->
unbind
(
LLTexUnit
::
TT_TEXTURE
);
gGL
.
getTexUnit
(
1
)
->
unbind
(
LLTexUnit
::
TT_TEXTURE
);
F32
blend_factor
=
0.
;
// if we even have sun disc textures to work with...
if
(
cloud_noise
||
cloud_noise_next
)
{
if
(
cloud_noise
&&
(
!
cloud_noise_next
||
(
cloud_noise
==
cloud_noise_next
)))
{
// Bind current and next sun textures
cloudshader
->
bindTexture
(
LLShaderMgr
::
CLOUD_NOISE_MAP
,
cloud_noise
,
LLTexUnit
::
TT_TEXTURE
);
blend_factor
=
0
;
}
else
if
(
cloud_noise_next
&&
!
cloud_noise
)
{
cloudshader
->
bindTexture
(
LLShaderMgr
::
CLOUD_NOISE_MAP
,
cloud_noise_next
,
LLTexUnit
::
TT_TEXTURE
);
blend_factor
=
0
;
}
else
if
(
cloud_noise_next
!=
cloud_noise
)
{
cloudshader
->
bindTexture
(
LLShaderMgr
::
CLOUD_NOISE_MAP
,
cloud_noise
,
LLTexUnit
::
TT_TEXTURE
);
cloudshader
->
bindTexture
(
LLShaderMgr
::
CLOUD_NOISE_MAP_NEXT
,
cloud_noise_next
,
LLTexUnit
::
TT_TEXTURE
);
}
}
cloudshader
->
bindTexture
(
LLShaderMgr
::
TRANSMITTANCE_TEX
,
gAtmosphere
->
getTransmittance
());
cloudshader
->
bindTexture
(
LLShaderMgr
::
SCATTER_TEX
,
gAtmosphere
->
getScattering
());
...
...
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