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
086c08c5
Commit
086c08c5
authored
4 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Kill dead code in sky render
parent
03572316
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/lldrawpoolwlsky.cpp
+1
-60
1 addition, 60 deletions
indra/newview/lldrawpoolwlsky.cpp
indra/newview/lldrawpoolwlsky.h
+0
-2
0 additions, 2 deletions
indra/newview/lldrawpoolwlsky.h
with
1 addition
and
62 deletions
indra/newview/lldrawpoolwlsky.cpp
+
1
−
60
View file @
086c08c5
...
@@ -124,11 +124,6 @@ void LLDrawPoolWLSky::endDeferredPass(S32 pass)
...
@@ -124,11 +124,6 @@ void LLDrawPoolWLSky::endDeferredPass(S32 pass)
moon_shader
=
nullptr
;
moon_shader
=
nullptr
;
}
}
void
LLDrawPoolWLSky
::
renderFsSky
(
const
LLVector3
&
camPosLocal
,
F32
camHeightLocal
,
LLGLSLShader
*
shader
)
const
{
gSky
.
mVOWLSkyp
->
drawFsSky
();
}
void
LLDrawPoolWLSky
::
renderDome
(
const
LLVector3
&
camPosLocal
,
F32
camHeightLocal
,
LLGLSLShader
*
shader
)
const
void
LLDrawPoolWLSky
::
renderDome
(
const
LLVector3
&
camPosLocal
,
F32
camHeightLocal
,
LLGLSLShader
*
shader
)
const
{
{
llassert_always
(
NULL
!=
shader
);
llassert_always
(
NULL
!=
shader
);
...
@@ -355,60 +350,6 @@ void LLDrawPoolWLSky::renderStarsDeferred(const LLSettingsSky::ptr_t& psky) cons
...
@@ -355,60 +350,6 @@ void LLDrawPoolWLSky::renderStarsDeferred(const LLSettingsSky::ptr_t& psky) cons
gDeferredStarProgram
.
unbind
();
gDeferredStarProgram
.
unbind
();
}
}
void
LLDrawPoolWLSky
::
renderSkyCloudsDeferred
(
const
LLSettingsSky
::
ptr_t
&
psky
,
const
LLVector3
&
camPosLocal
,
F32
camHeightLocal
,
LLGLSLShader
*
cloudshader
)
const
{
if
(
gPipeline
.
canUseWindLightShaders
()
&&
gPipeline
.
hasRenderType
(
LLPipeline
::
RENDER_TYPE_CLOUDS
)
&&
gSky
.
mVOSkyp
->
getCloudNoiseTex
())
{
LLGLSPipelineBlendSkyBox
pipeline
(
true
,
true
);
cloudshader
->
bind
();
LLPointer
<
LLViewerTexture
>
cloud_noise
=
gSky
.
mVOSkyp
->
getCloudNoiseTex
();
LLPointer
<
LLViewerTexture
>
cloud_noise_next
=
gSky
.
mVOSkyp
->
getCloudNoiseTexNext
();
gGL
.
getTexUnit
(
0
)
->
unbind
(
LLTexUnit
::
TT_TEXTURE
);
gGL
.
getTexUnit
(
1
)
->
unbind
(
LLTexUnit
::
TT_TEXTURE
);
F32
cloud_variance
=
psky
?
psky
->
getCloudVariance
()
:
0.0
f
;
F32
blend_factor
=
psky
?
psky
->
getBlendFactor
()
:
0.0
f
;
// 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
->
uniform1f
(
LLShaderMgr
::
BLEND_FACTOR
,
blend_factor
);
cloudshader
->
uniform1f
(
LLShaderMgr
::
CLOUD_VARIANCE
,
cloud_variance
);
cloudshader
->
uniform1f
(
LLShaderMgr
::
SUN_MOON_GLOW_FACTOR
,
psky
->
getSunMoonGlowFactor
());
((
LLSettingsVOSky
*
)
psky
.
get
())
->
updateShader
(
cloudshader
);
/// Render the skydome
renderDome
(
camPosLocal
,
camHeightLocal
,
cloudshader
);
cloudshader
->
unbind
();
gGL
.
getTexUnit
(
0
)
->
unbind
(
LLTexUnit
::
TT_TEXTURE
);
gGL
.
getTexUnit
(
1
)
->
unbind
(
LLTexUnit
::
TT_TEXTURE
);
}
}
void
LLDrawPoolWLSky
::
renderSkyClouds
(
const
LLSettingsSky
::
ptr_t
&
psky
,
const
LLVector3
&
camPosLocal
,
F32
camHeightLocal
,
LLGLSLShader
*
cloudshader
)
const
void
LLDrawPoolWLSky
::
renderSkyClouds
(
const
LLSettingsSky
::
ptr_t
&
psky
,
const
LLVector3
&
camPosLocal
,
F32
camHeightLocal
,
LLGLSLShader
*
cloudshader
)
const
{
{
if
(
gPipeline
.
canUseWindLightShaders
()
&&
gPipeline
.
hasRenderType
(
LLPipeline
::
RENDER_TYPE_CLOUDS
)
&&
gSky
.
mVOSkyp
->
getCloudNoiseTex
())
if
(
gPipeline
.
canUseWindLightShaders
()
&&
gPipeline
.
hasRenderType
(
LLPipeline
::
RENDER_TYPE_CLOUDS
)
&&
gSky
.
mVOSkyp
->
getCloudNoiseTex
())
...
@@ -600,7 +541,7 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass)
...
@@ -600,7 +541,7 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass)
renderSkyHazeDeferred
(
psky
,
origin
,
camHeightLocal
);
renderSkyHazeDeferred
(
psky
,
origin
,
camHeightLocal
);
renderStarsDeferred
(
psky
);
renderStarsDeferred
(
psky
);
renderHeavenlyBodies
(
psky
,
origin
);
renderHeavenlyBodies
(
psky
,
origin
);
renderSkyClouds
Deferred
(
psky
,
origin
,
camHeightLocal
,
cloud_shader
);
renderSkyClouds
(
psky
,
origin
,
camHeightLocal
,
cloud_shader
);
}
}
gGL
.
setColorMask
(
true
,
true
);
gGL
.
setColorMask
(
true
,
true
);
}
}
...
...
This diff is collapsed.
Click to expand it.
indra/newview/lldrawpoolwlsky.h
+
0
−
2
View file @
086c08c5
...
@@ -71,14 +71,12 @@ class LLDrawPoolWLSky final : public LLDrawPool {
...
@@ -71,14 +71,12 @@ class LLDrawPoolWLSky final : public LLDrawPool {
static
void
cleanupGL
();
static
void
cleanupGL
();
static
void
restoreGL
();
static
void
restoreGL
();
private
:
private
:
void
renderFsSky
(
const
LLVector3
&
camPosLocal
,
F32
camHeightLocal
,
LLGLSLShader
*
shader
)
const
;
void
renderDome
(
const
LLVector3
&
camPosLocal
,
F32
camHeightLocal
,
LLGLSLShader
*
shader
)
const
;
void
renderDome
(
const
LLVector3
&
camPosLocal
,
F32
camHeightLocal
,
LLGLSLShader
*
shader
)
const
;
void
renderSkyHaze
(
const
LLVector3
&
camPosLocal
,
F32
camHeightLocal
)
const
;
void
renderSkyHaze
(
const
LLVector3
&
camPosLocal
,
F32
camHeightLocal
)
const
;
void
renderSkyClouds
(
const
LLSettingsSky
::
ptr_t
&
psky
,
const
LLVector3
&
camPosLocal
,
F32
camHeightLocal
,
LLGLSLShader
*
cloudshader
)
const
;
void
renderSkyClouds
(
const
LLSettingsSky
::
ptr_t
&
psky
,
const
LLVector3
&
camPosLocal
,
F32
camHeightLocal
,
LLGLSLShader
*
cloudshader
)
const
;
void
renderSkyHazeDeferred
(
const
LLSettingsSky
::
ptr_t
&
psky
,
const
LLVector3
&
camPosLocal
,
F32
camHeightLocal
)
const
;
void
renderSkyHazeDeferred
(
const
LLSettingsSky
::
ptr_t
&
psky
,
const
LLVector3
&
camPosLocal
,
F32
camHeightLocal
)
const
;
void
renderSkyCloudsDeferred
(
const
LLSettingsSky
::
ptr_t
&
psky
,
const
LLVector3
&
camPosLocal
,
F32
camHeightLocal
,
LLGLSLShader
*
cloudshader
)
const
;
void
renderStarsDeferred
(
const
LLSettingsSky
::
ptr_t
&
psky
)
const
;
void
renderStarsDeferred
(
const
LLSettingsSky
::
ptr_t
&
psky
)
const
;
void
renderStars
(
const
LLSettingsSky
::
ptr_t
&
psky
)
const
;
void
renderStars
(
const
LLSettingsSky
::
ptr_t
&
psky
)
const
;
...
...
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