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
0420444e
Commit
0420444e
authored
5 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Various small fixes and opts to particles
parent
7ec12bf5
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/newview/lldrawpoolalpha.cpp
+1
-0
1 addition, 0 deletions
indra/newview/lldrawpoolalpha.cpp
indra/newview/llviewerpartsource.cpp
+9
-6
9 additions, 6 deletions
indra/newview/llviewerpartsource.cpp
indra/newview/llvopartgroup.cpp
+2
-1
2 additions, 1 deletion
indra/newview/llvopartgroup.cpp
with
12 additions
and
7 deletions
indra/newview/lldrawpoolalpha.cpp
+
1
−
0
View file @
0420444e
...
...
@@ -803,6 +803,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
// If this alpha mesh has glow, then draw it a second time to add the destination-alpha (=glow). Interleaving these state-changing calls is expensive, but glow must be drawn Z-sorted with alpha.
if
(
current_shader
&&
draw_glow_for_this_partition
&&
(
!
is_particle_or_hud_particle
||
params
.
mHasGlow
)
&&
params
.
mVertexBuffer
->
hasDataType
(
LLVertexBuffer
::
TYPE_EMISSIVE
))
{
LL_RECORD_BLOCK_TIME
(
FTM_RENDER_ALPHA_EMISSIVE
);
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llviewerpartsource.cpp
+
9
−
6
View file @
0420444e
...
...
@@ -301,6 +301,9 @@ void LLViewerPartSourceScript::update(const F32 dt)
continue
;
}
if
(
mPartSysData
.
mPartData
.
mFlags
&
LLPartData
::
LL_PART_RIBBON_MASK
&&
mLastPart
&&
(
mLastPart
->
mPosAgent
-
mPosAgent
).
magVec
()
<=
.005
f
)
continue
;
//Skip if parent isn't far enough away.
LLViewerPart
*
part
=
new
LLViewerPart
();
part
->
init
(
this
,
mImagep
,
NULL
);
...
...
@@ -375,7 +378,7 @@ void LLViewerPartSourceScript::update(const F32 dt)
part
->
mPosAgent
=
mPosAgent
;
// original implemenetation for part_dir_vector was just:
LLVector3
part_dir_vector
(
0.0
,
0.0
,
1.0
);
LLVector3
part_dir_vector
(
0.0
f
,
0.0
f
,
1.0
f
);
// params from the script...
// outer = outer cone angle
// inner = inner cone angle
...
...
@@ -386,24 +389,24 @@ void LLViewerPartSourceScript::update(const F32 dt)
// generate a random angle within the given space...
F32
angle
=
innerAngle
+
ll_frand
(
outerAngle
-
innerAngle
);
// split which side it will go on randomly...
if
(
ll_frand
()
<
0.5
)
if
(
ll_frand
()
<
0.5
f
)
{
angle
=
-
angle
;
}
// Both patterns rotate around the x-axis first:
part_dir_vector
.
rotVec
(
angle
,
1.0
,
0.0
,
0.0
);
part_dir_vector
.
rotVec
(
angle
,
1.0
f
,
0.0
f
,
0.0
f
);
// If this is a cone pattern, rotate again to create the cone.
if
(
mPartSysData
.
mPattern
&
LLPartSysData
::
LL_PART_SRC_PATTERN_ANGLE_CONE
)
{
part_dir_vector
.
rotVec
(
ll_frand
(
4
*
F_PI
),
0.0
,
0.0
,
1.0
);
part_dir_vector
.
rotVec
(
ll_frand
(
4
.
f
*
F_PI
),
0.0
f
,
0.0
f
,
1.0
f
);
}
// Only apply this rotation if using the deprecated angles.
if
(
!
(
mPartSysData
.
mFlags
&
LLPartSysData
::
LL_PART_USE_NEW_ANGLE
))
{
// Deprecated...
part_dir_vector
.
rotVec
(
outerAngle
,
1.0
,
0.0
,
0.0
);
part_dir_vector
.
rotVec
(
outerAngle
,
1.0
f
,
0.0
f
,
0.0
f
);
}
if
(
mSourceObjectp
)
...
...
@@ -430,7 +433,7 @@ void LLViewerPartSourceScript::update(const F32 dt)
if
(
part
->
mFlags
&
LLPartData
::
LL_PART_FOLLOW_SRC_MASK
||
// SVC-193, VWR-717
part
->
mFlags
&
LLPartData
::
LL_PART_TARGET_LINEAR_MASK
)
{
mPartSysData
.
mBurstRadius
=
0
;
mPartSysData
.
mBurstRadius
=
0
.
f
;
}
LLViewerPartSim
::
getInstance
()
->
addPart
(
part
);
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llvopartgroup.cpp
+
2
−
1
View file @
0420444e
...
...
@@ -713,7 +713,8 @@ void LLVOPartGroup::getGeometry(S32 idx,
*
colorsp
++
=
color
;
*
colorsp
++
=
color
;
//if (pglow.mV[3] || part.mGlow.mV[3])
//Only add emissive attributes if glowing (doing it for all particles is INCREDIBLY inefficient as it leads to a second, slower, render pass.)
if
(
gPipeline
.
canUseVertexShaders
()
&&
(
pglow
.
mV
[
3
]
>
0
||
part
.
mGlow
.
mV
[
3
]
>
0
))
{
//only write glow if it is not zero
*
emissivep
++
=
pglow
;
*
emissivep
++
=
pglow
;
...
...
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