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
f34f0857
Commit
f34f0857
authored
4 years ago
by
Kitty Barnett
Browse files
Options
Downloads
Patches
Plain Diff
Only one @setsphere effect is ever visible (broken when code moved to LLPipeline::renderFinalize)
parent
8238aee5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/newview/llvisualeffect.cpp
+13
-13
13 additions, 13 deletions
indra/newview/llvisualeffect.cpp
indra/newview/llvisualeffect.h
+12
-3
12 additions, 3 deletions
indra/newview/llvisualeffect.h
with
25 additions
and
16 deletions
indra/newview/llvisualeffect.cpp
+
13
−
13
View file @
f34f0857
...
@@ -107,33 +107,33 @@ bool LLVfxManager::removeEffect(const LLUUID& idEffect)
...
@@ -107,33 +107,33 @@ bool LLVfxManager::removeEffect(const LLUUID& idEffect)
return
true
;
return
true
;
}
}
void
LLVfxManager
::
runEffect
(
EVisualEffect
eCode
,
const
LLVisualEffectParams
*
pParams
)
void
LLVfxManager
::
runEffect
(
EVisualEffect
eCode
,
LLVisualEffectParams
*
pParams
)
{
{
// *TODO-Catz: once we're done, check whether iterating over the entire list still has negliable impact
// *TODO-Catz: once we're done, check whether iterating over the entire list still has negliable impact
auto
pred
=
[
eCode
](
const
LLVisualEffect
*
pEffect
)
{
return
pEffect
->
getCode
()
==
eCode
;
};
auto
pred
=
[
eCode
](
const
LLVisualEffect
*
pEffect
)
{
return
pEffect
->
getCode
()
==
eCode
;
};
auto
begin
Effect
=
boost
::
make_filter_iterator
(
pred
,
m_Effects
.
begin
(),
m_Effects
.
end
()),
auto
it
Effect
=
boost
::
make_filter_iterator
(
pred
,
m_Effects
.
begin
(),
m_Effects
.
end
()),
endEffect
=
boost
::
make_filter_iterator
(
pred
,
m_Effects
.
end
(),
m_Effects
.
end
());
endEffect
=
boost
::
make_filter_iterator
(
pred
,
m_Effects
.
end
(),
m_Effects
.
end
());
for
(;
itEffect
!=
endEffect
;
++
itEffect
)
auto
effectRange
=
boost
::
make_iterator_range
(
beginEffect
,
endEffect
);
for
(
LLVisualEffect
*
pEffect
:
effectRange
)
{
{
pEffect
->
run
(
pParams
);
if
(
pParams
)
pParams
->
step
(
itEffect
==
endEffect
);
(
*
itEffect
)
->
run
(
pParams
);
}
}
}
}
void
LLVfxManager
::
runEffect
(
EVisualEffectType
eType
,
const
LLVisualEffectParams
*
pParams
)
void
LLVfxManager
::
runEffect
(
EVisualEffectType
eType
,
LLVisualEffectParams
*
pParams
)
{
{
// *TODO-Catz: once we're done, check whether iterating over the entire list still has negliable impact
// *TODO-Catz: once we're done, check whether iterating over the entire list still has negliable impact
auto
pred
=
[
eType
](
const
LLVisualEffect
*
pEffect
)
{
return
pEffect
->
getType
()
==
eType
;
};
auto
pred
=
[
eType
](
const
LLVisualEffect
*
pEffect
)
{
return
pEffect
->
getType
()
==
eType
;
};
auto
beginEffect
=
boost
::
make_filter_iterator
(
pred
,
m_Effects
.
begin
(),
m_Effects
.
end
()),
auto
itEffect
=
boost
::
make_filter_iterator
(
pred
,
m_Effects
.
begin
(),
m_Effects
.
end
()),
endEffect
=
boost
::
make_filter_iterator
(
pred
,
m_Effects
.
end
(),
m_Effects
.
end
());
endEffect
=
boost
::
make_filter_iterator
(
pred
,
m_Effects
.
end
(),
m_Effects
.
end
());
for
(;
itEffect
!=
endEffect
;
++
itEffect
)
auto
effectRange
=
boost
::
make_iterator_range
(
beginEffect
,
endEffect
);
for
(
LLVisualEffect
*
pEffect
:
effectRange
)
{
{
pEffect
->
run
(
pParams
);
if
(
pParams
)
pParams
->
step
(
itEffect
==
endEffect
);
(
*
itEffect
)
->
run
(
pParams
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llvisualeffect.h
+
12
−
3
View file @
f34f0857
...
@@ -46,14 +46,23 @@ enum class EVisualEffectType
...
@@ -46,14 +46,23 @@ enum class EVisualEffectType
struct
LLVisualEffectParams
struct
LLVisualEffectParams
{
{
virtual
void
step
(
bool
isLast
)
=
0
;
};
};
struct
LLShaderEffectParams
:
LLVisualEffectParams
struct
LLShaderEffectParams
:
LLVisualEffectParams
{
{
explicit
LLShaderEffectParams
(
LLRenderTarget
*
pSrcBuffer
,
LLRenderTarget
*
pDstBuffer
)
:
m_pSrcBuffer
(
pSrcBuffer
),
m_pDstBuffer
(
pDstBuffer
)
{}
explicit
LLShaderEffectParams
(
LLRenderTarget
*
pSrcBuffer
,
LLRenderTarget
*
pScratchBuffer
,
bool
fBindLast
)
:
m_pSrcBuffer
(
pScratchBuffer
),
m_pDstBuffer
(
pSrcBuffer
),
m_fBindLast
(
fBindLast
)
{}
void
step
(
bool
isLast
)
override
{
LLRenderTarget
*
pPrevSrc
=
m_pSrcBuffer
,
*
pPrevDst
=
m_pDstBuffer
;
m_pSrcBuffer
=
pPrevDst
;
m_pDstBuffer
=
(
!
isLast
||
!
m_fBindLast
)
?
pPrevSrc
:
nullptr
;
}
LLRenderTarget
*
m_pSrcBuffer
=
nullptr
;
LLRenderTarget
*
m_pSrcBuffer
=
nullptr
;
LLRenderTarget
*
m_pDstBuffer
=
nullptr
;
LLRenderTarget
*
m_pDstBuffer
=
nullptr
;
bool
m_fBindLast
=
false
;
};
};
// ============================================================================
// ============================================================================
...
@@ -161,8 +170,8 @@ class LLVfxManager : public LLSingleton<LLVfxManager>
...
@@ -161,8 +170,8 @@ class LLVfxManager : public LLSingleton<LLVfxManager>
LLVisualEffect
*
getEffect
(
EVisualEffect
eCode
)
const
;
LLVisualEffect
*
getEffect
(
EVisualEffect
eCode
)
const
;
template
<
typename
T
>
T
*
getEffect
(
EVisualEffect
eCode
)
const
{
return
dynamic_cast
<
T
*>
(
getEffect
(
eCode
));
}
template
<
typename
T
>
T
*
getEffect
(
EVisualEffect
eCode
)
const
{
return
dynamic_cast
<
T
*>
(
getEffect
(
eCode
));
}
bool
removeEffect
(
const
LLUUID
&
idEffect
);
bool
removeEffect
(
const
LLUUID
&
idEffect
);
void
runEffect
(
EVisualEffect
eCode
,
const
LLVisualEffectParams
*
pParams
=
nullptr
);
void
runEffect
(
EVisualEffect
eCode
,
LLVisualEffectParams
*
pParams
=
nullptr
);
void
runEffect
(
EVisualEffectType
eType
,
const
LLVisualEffectParams
*
pParams
=
nullptr
);
void
runEffect
(
EVisualEffectType
eType
,
LLVisualEffectParams
*
pParams
=
nullptr
);
protected
:
protected
:
/*
/*
...
...
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