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
47cd3cb0
Commit
47cd3cb0
authored
1 year ago
by
Jonathan "Geenz" Goodman
Browse files
Options
Downloads
Patches
Plain Diff
#681 More generalization of falloff.
parent
8b374f73
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
+2
-19
2 additions, 19 deletions
...pp_settings/shaders/class3/deferred/reflectionProbeF.glsl
with
2 additions
and
19 deletions
indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
+
2
−
19
View file @
47cd3cb0
...
@@ -698,22 +698,6 @@ layout (std140) uniform HeroProbeData
...
@@ -698,22 +698,6 @@ layout (std140) uniform HeroProbeData
int
heroProbeCount
;
int
heroProbeCount
;
};
};
float
sphereWeightHero
(
vec3
pos
,
vec3
dir
,
vec3
origin
,
float
r
,
out
float
dw
)
{
float
r1
=
r
*
0
.
5
;
// 50% of radius (outer sphere to start interpolating down)
vec3
delta
=
pos
.
xyz
-
origin
;
float
d2
=
max
(
length
(
delta
),
0
.
001
);
float
atten
=
1
.
0
-
max
(
d2
-
r1
,
0
.
0
)
/
max
((
r
-
r1
),
0
.
001
);
float
w
=
1
.
0
/
d2
;
dw
=
w
*
atten
*
max
(
r
,
1
.
0
)
*
4
;
w
*=
atten
;
return
w
;
}
void
tapHeroProbe
(
inout
vec3
glossenv
,
vec3
pos
,
vec3
norm
,
float
glossiness
)
void
tapHeroProbe
(
inout
vec3
glossenv
,
vec3
pos
,
vec3
norm
,
float
glossiness
)
{
{
float
clipDist
=
dot
(
pos
.
xyz
,
clipPlane
.
xyz
)
+
clipPlane
.
w
;
float
clipDist
=
dot
(
pos
.
xyz
,
clipPlane
.
xyz
)
+
clipPlane
.
w
;
...
@@ -729,16 +713,15 @@ void tapHeroProbe(inout vec3 glossenv, vec3 pos, vec3 norm, float glossiness)
...
@@ -729,16 +713,15 @@ void tapHeroProbe(inout vec3 glossenv, vec3 pos, vec3 norm, float glossiness)
else
else
{
{
float
r
=
heroSphere
[
0
].
w
;
float
r
=
heroSphere
[
0
].
w
;
//v = sphereIntersect(pos, norm, heroSphere[0].xyz, 4096.0*4096.0);
w
=
sphereWeight
Hero
(
pos
,
norm
,
heroSphere
[
0
].
xyz
,
r
,
dw
);
w
=
sphereWeight
(
pos
,
norm
,
heroSphere
[
0
].
xyz
,
r
,
vec4
(
1
),
dw
);
}
}
{
{
vec3
refnormpersp
=
reflect
(
pos
.
xyz
,
norm
.
xyz
);
vec3
refnormpersp
=
reflect
(
pos
.
xyz
,
norm
.
xyz
);
if
(
dot
(
refnormpersp
.
xyz
,
clipPlane
.
xyz
)
>
0
.
0
)
if
(
dot
(
refnormpersp
.
xyz
,
clipPlane
.
xyz
)
>
0
.
0
)
{
{
glossenv
=
textureLod
(
heroProbes
,
vec4
(
env_mat
*
refnormpersp
,
0
),
(
1
.
0
-
glossiness
)
*
heroMipCount
).
xyz
*
w
;
glossenv
=
mix
(
glossenv
,
textureLod
(
heroProbes
,
vec4
(
env_mat
*
refnormpersp
,
0
),
(
1
.
0
-
glossiness
)
*
heroMipCount
).
xyz
,
w
)
;
}
}
}
}
}
}
...
...
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