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
ee73a524
Commit
ee73a524
authored
4 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Fix stars being stuck at the ground.
parent
086c08c5
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
+13
-6
13 additions, 6 deletions
indra/newview/lldrawpoolwlsky.cpp
indra/newview/lldrawpoolwlsky.h
+2
-2
2 additions, 2 deletions
indra/newview/lldrawpoolwlsky.h
with
15 additions
and
8 deletions
indra/newview/lldrawpoolwlsky.cpp
+
13
−
6
View file @
ee73a524
...
@@ -215,7 +215,7 @@ void LLDrawPoolWLSky::renderSkyHaze(const LLVector3& camPosLocal, F32 camHeightL
...
@@ -215,7 +215,7 @@ void LLDrawPoolWLSky::renderSkyHaze(const LLVector3& camPosLocal, F32 camHeightL
}
}
}
}
void
LLDrawPoolWLSky
::
renderStars
(
const
LLSettingsSky
::
ptr_t
&
psky
)
const
void
LLDrawPoolWLSky
::
renderStars
(
const
LLSettingsSky
::
ptr_t
&
psky
,
const
LLVector3
&
camPosLocal
)
const
{
{
LLGLSPipelineBlendSkyBox
gls_skybox
(
true
,
false
);
LLGLSPipelineBlendSkyBox
gls_skybox
(
true
,
false
);
...
@@ -257,7 +257,7 @@ void LLDrawPoolWLSky::renderStars(const LLSettingsSky::ptr_t& psky) const
...
@@ -257,7 +257,7 @@ void LLDrawPoolWLSky::renderStars(const LLSettingsSky::ptr_t& psky) const
}
}
gGL
.
pushMatrix
();
gGL
.
pushMatrix
();
gGL
.
rotatef
(
gFrameTimeSeconds
*
0.01
f
,
0.
f
,
0.
f
,
1.
f
);
gGL
.
translatef
(
camPosLocal
.
mV
[
0
],
camPosLocal
.
mV
[
1
],
camPosLocal
.
mV
[
2
]
);
if
(
LLGLSLShader
::
sNoFixedFunction
)
if
(
LLGLSLShader
::
sNoFixedFunction
)
{
{
gCustomAlphaProgram
.
bind
();
gCustomAlphaProgram
.
bind
();
...
@@ -287,7 +287,7 @@ void LLDrawPoolWLSky::renderStars(const LLSettingsSky::ptr_t& psky) const
...
@@ -287,7 +287,7 @@ void LLDrawPoolWLSky::renderStars(const LLSettingsSky::ptr_t& psky) const
}
}
}
}
void
LLDrawPoolWLSky
::
renderStarsDeferred
(
const
LLSettingsSky
::
ptr_t
&
psky
)
const
void
LLDrawPoolWLSky
::
renderStarsDeferred
(
const
LLSettingsSky
::
ptr_t
&
psky
,
const
LLVector3
&
camPosLocal
)
const
{
{
LLGLSPipelineBlendSkyBox
gls_sky
(
true
,
false
);
LLGLSPipelineBlendSkyBox
gls_sky
(
true
,
false
);
...
@@ -304,7 +304,7 @@ void LLDrawPoolWLSky::renderStarsDeferred(const LLSettingsSky::ptr_t& psky) cons
...
@@ -304,7 +304,7 @@ void LLDrawPoolWLSky::renderStarsDeferred(const LLSettingsSky::ptr_t& psky) cons
return
;
return
;
}
}
gDeferredStarProgram
.
bind
();
LLViewerTexture
*
tex_a
=
gSky
.
mVOSkyp
->
getBloomTex
();
LLViewerTexture
*
tex_a
=
gSky
.
mVOSkyp
->
getBloomTex
();
LLViewerTexture
*
tex_b
=
gSky
.
mVOSkyp
->
getBloomTexNext
();
LLViewerTexture
*
tex_b
=
gSky
.
mVOSkyp
->
getBloomTexNext
();
...
@@ -330,6 +330,11 @@ void LLDrawPoolWLSky::renderStarsDeferred(const LLSettingsSky::ptr_t& psky) cons
...
@@ -330,6 +330,11 @@ void LLDrawPoolWLSky::renderStarsDeferred(const LLSettingsSky::ptr_t& psky) cons
gGL
.
getTexUnit
(
1
)
->
bind
(
tex_b
);
gGL
.
getTexUnit
(
1
)
->
bind
(
tex_b
);
}
}
gGL
.
pushMatrix
();
gGL
.
translatef
(
camPosLocal
.
mV
[
0
],
camPosLocal
.
mV
[
1
],
camPosLocal
.
mV
[
2
]);
gDeferredStarProgram
.
bind
();
gDeferredStarProgram
.
uniform1f
(
LLShaderMgr
::
BLEND_FACTOR
,
blend_factor
);
gDeferredStarProgram
.
uniform1f
(
LLShaderMgr
::
BLEND_FACTOR
,
blend_factor
);
if
(
LLPipeline
::
sReflectionRender
)
if
(
LLPipeline
::
sReflectionRender
)
...
@@ -347,6 +352,8 @@ void LLDrawPoolWLSky::renderStarsDeferred(const LLSettingsSky::ptr_t& psky) cons
...
@@ -347,6 +352,8 @@ void LLDrawPoolWLSky::renderStarsDeferred(const LLSettingsSky::ptr_t& psky) cons
gGL
.
getTexUnit
(
0
)
->
unbind
(
LLTexUnit
::
TT_TEXTURE
);
gGL
.
getTexUnit
(
0
)
->
unbind
(
LLTexUnit
::
TT_TEXTURE
);
gGL
.
getTexUnit
(
1
)
->
unbind
(
LLTexUnit
::
TT_TEXTURE
);
gGL
.
getTexUnit
(
1
)
->
unbind
(
LLTexUnit
::
TT_TEXTURE
);
gGL
.
popMatrix
();
gDeferredStarProgram
.
unbind
();
gDeferredStarProgram
.
unbind
();
}
}
...
@@ -539,7 +546,7 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass)
...
@@ -539,7 +546,7 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass)
const
LLSettingsSky
::
ptr_t
&
psky
=
environment
.
getCurrentSky
();
const
LLSettingsSky
::
ptr_t
&
psky
=
environment
.
getCurrentSky
();
renderSkyHazeDeferred
(
psky
,
origin
,
camHeightLocal
);
renderSkyHazeDeferred
(
psky
,
origin
,
camHeightLocal
);
renderStarsDeferred
(
psky
);
renderStarsDeferred
(
psky
,
origin
);
renderHeavenlyBodies
(
psky
,
origin
);
renderHeavenlyBodies
(
psky
,
origin
);
renderSkyClouds
(
psky
,
origin
,
camHeightLocal
,
cloud_shader
);
renderSkyClouds
(
psky
,
origin
,
camHeightLocal
,
cloud_shader
);
}
}
...
@@ -562,7 +569,7 @@ void LLDrawPoolWLSky::render(S32 pass)
...
@@ -562,7 +569,7 @@ void LLDrawPoolWLSky::render(S32 pass)
const
LLSettingsSky
::
ptr_t
&
psky
=
environment
.
getCurrentSky
();
const
LLSettingsSky
::
ptr_t
&
psky
=
environment
.
getCurrentSky
();
renderSkyHaze
(
origin
,
camHeightLocal
);
renderSkyHaze
(
origin
,
camHeightLocal
);
renderStars
(
psky
);
renderStars
(
psky
,
origin
);
renderHeavenlyBodies
(
psky
,
origin
);
renderHeavenlyBodies
(
psky
,
origin
);
renderSkyClouds
(
psky
,
origin
,
camHeightLocal
,
cloud_shader
);
renderSkyClouds
(
psky
,
origin
,
camHeightLocal
,
cloud_shader
);
...
...
This diff is collapsed.
Click to expand it.
indra/newview/lldrawpoolwlsky.h
+
2
−
2
View file @
ee73a524
...
@@ -78,8 +78,8 @@ class LLDrawPoolWLSky final : public LLDrawPool {
...
@@ -78,8 +78,8 @@ class LLDrawPoolWLSky final : public LLDrawPool {
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
renderStarsDeferred
(
const
LLSettingsSky
::
ptr_t
&
psky
)
const
;
void
renderStarsDeferred
(
const
LLSettingsSky
::
ptr_t
&
psky
,
const
LLVector3
&
camPosLocal
)
const
;
void
renderStars
(
const
LLSettingsSky
::
ptr_t
&
psky
)
const
;
void
renderStars
(
const
LLSettingsSky
::
ptr_t
&
psky
,
const
LLVector3
&
camPosLocal
)
const
;
void
renderHeavenlyBodies
(
const
LLSettingsSky
::
ptr_t
&
psky
,
const
LLVector3
&
camPosLocal
);
void
renderHeavenlyBodies
(
const
LLSettingsSky
::
ptr_t
&
psky
,
const
LLVector3
&
camPosLocal
);
};
};
...
...
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