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
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
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 Archive
Alchemy Viewer
Commits
aaf42d47
Commit
aaf42d47
authored
11 years ago
by
David Parks
Browse files
Options
Downloads
Patches
Plain Diff
Line endings.
parent
322b19d6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
+32
-32
32 additions, 32 deletions
...pp_settings/shaders/class1/deferred/multiPointLightF.glsl
with
32 additions
and
32 deletions
indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
+
32
−
32
View file @
aaf42d47
...
...
@@ -56,38 +56,38 @@ uniform float far_z;
uniform
mat4
inv_proj
;
#ifdef SINGLE_FP_ONLY
vec2
encode_normal
(
vec3
n
)
{
vec2
sn
;
sn
.
xy
=
(
n
.
xy
*
vec2
(
0
.
5
f
,
0
.
5
f
))
+
vec2
(
0
.
5
f
,
0
.
5
f
);
return
sn
;
}
vec3
decode_normal
(
vec2
enc
)
{
vec3
n
;
n
.
xy
=
(
enc
.
xy
*
vec2
(
2
.
0
f
,
2
.
0
f
))
-
vec2
(
1
.
0
f
,
1
.
0
f
);
n
.
z
=
sqrt
(
1
.
0
f
-
dot
(
n
.
xy
,
n
.
xy
));
return
n
;
}
#else
vec2
encode_normal
(
vec3
n
)
{
float
f
=
sqrt
(
8
*
n
.
z
+
8
);
return
n
.
xy
/
f
+
0
.
5
;
}
vec3
decode_normal
(
vec2
enc
)
{
vec2
fenc
=
enc
*
4
-
2
;
float
f
=
dot
(
fenc
,
fenc
);
float
g
=
sqrt
(
1
-
f
/
4
);
vec3
n
;
n
.
xy
=
fenc
*
g
;
n
.
z
=
1
-
f
/
2
;
return
n
;
}
#ifdef SINGLE_FP_ONLY
vec2
encode_normal
(
vec3
n
)
{
vec2
sn
;
sn
.
xy
=
(
n
.
xy
*
vec2
(
0
.
5
f
,
0
.
5
f
))
+
vec2
(
0
.
5
f
,
0
.
5
f
);
return
sn
;
}
vec3
decode_normal
(
vec2
enc
)
{
vec3
n
;
n
.
xy
=
(
enc
.
xy
*
vec2
(
2
.
0
f
,
2
.
0
f
))
-
vec2
(
1
.
0
f
,
1
.
0
f
);
n
.
z
=
sqrt
(
1
.
0
f
-
dot
(
n
.
xy
,
n
.
xy
));
return
n
;
}
#else
vec2
encode_normal
(
vec3
n
)
{
float
f
=
sqrt
(
8
*
n
.
z
+
8
);
return
n
.
xy
/
f
+
0
.
5
;
}
vec3
decode_normal
(
vec2
enc
)
{
vec2
fenc
=
enc
*
4
-
2
;
float
f
=
dot
(
fenc
,
fenc
);
float
g
=
sqrt
(
1
-
f
/
4
);
vec3
n
;
n
.
xy
=
fenc
*
g
;
n
.
z
=
1
-
f
/
2
;
return
n
;
}
#endif
vec4
getPosition
(
vec2
pos_screen
)
...
...
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