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
010d4024
Commit
010d4024
authored
17 years ago
by
Brad Kittenbrink
Browse files
Options
Downloads
Patches
Plain Diff
Setting some shader svn:eol-style properties to native to prevent conflicts in windlight4 branch.
parent
87f424c6
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/app_settings/shaders/class1/objects/shinyF.glsl
+13
-13
13 additions, 13 deletions
...a/newview/app_settings/shaders/class1/objects/shinyF.glsl
indra/newview/app_settings/shaders/class1/objects/shinyV.glsl
+27
-27
27 additions, 27 deletions
...a/newview/app_settings/shaders/class1/objects/shinyV.glsl
with
40 additions
and
40 deletions
indra/newview/app_settings/shaders/class1/objects/shinyF.glsl
+
13
−
13
View file @
010d4024
void
applyScatter
(
inout
vec3
col
);
uniform
samplerCube
environmentMap
;
void
main
()
{
vec3
ref
=
textureCube
(
environmentMap
,
gl_TexCoord
[
0
].
xyz
).
rgb
;
applyScatter
(
ref
);
gl_FragColor
.
rgb
=
ref
;
gl_FragColor
.
a
=
gl_Color
.
a
;
}
void
applyScatter
(
inout
vec3
col
);
uniform
samplerCube
environmentMap
;
void
main
()
{
vec3
ref
=
textureCube
(
environmentMap
,
gl_TexCoord
[
0
].
xyz
).
rgb
;
applyScatter
(
ref
);
gl_FragColor
.
rgb
=
ref
;
gl_FragColor
.
a
=
gl_Color
.
a
;
}
This diff is collapsed.
Click to expand it.
indra/newview/app_settings/shaders/class1/objects/shinyV.glsl
+
27
−
27
View file @
010d4024
void
default_scatter
(
vec3
viewVec
,
vec3
lightDir
);
uniform
vec4
origin
;
void
main
()
{
//transform vertex
gl_Position
=
gl_ModelViewProjectionMatrix
*
gl_Vertex
;
vec3
pos
=
(
gl_ModelViewMatrix
*
gl_Vertex
).
xyz
;
vec3
norm
=
normalize
(
gl_NormalMatrix
*
gl_Normal
);
gl_FrontColor
=
gl_Color
;
vec3
ref
=
reflect
(
pos
,
norm
);
vec3
d
=
pos
-
origin
.
xyz
;
float
dist
=
dot
(
normalize
(
d
),
ref
);
vec3
e
=
d
+
(
ref
*
max
(
origin
.
w
-
dist
,
0
.
0
));
ref
=
e
-
origin
.
xyz
;
gl_TexCoord
[
0
]
=
gl_TextureMatrix
[
0
]
*
vec4
(
ref
,
1
.
0
);
default_scatter
(
pos
.
xyz
,
gl_LightSource
[
0
].
position
.
xyz
);
}
void
default_scatter
(
vec3
viewVec
,
vec3
lightDir
);
uniform
vec4
origin
;
void
main
()
{
//transform vertex
gl_Position
=
gl_ModelViewProjectionMatrix
*
gl_Vertex
;
vec3
pos
=
(
gl_ModelViewMatrix
*
gl_Vertex
).
xyz
;
vec3
norm
=
normalize
(
gl_NormalMatrix
*
gl_Normal
);
gl_FrontColor
=
gl_Color
;
vec3
ref
=
reflect
(
pos
,
norm
);
vec3
d
=
pos
-
origin
.
xyz
;
float
dist
=
dot
(
normalize
(
d
),
ref
);
vec3
e
=
d
+
(
ref
*
max
(
origin
.
w
-
dist
,
0
.
0
));
ref
=
e
-
origin
.
xyz
;
gl_TexCoord
[
0
]
=
gl_TextureMatrix
[
0
]
*
vec4
(
ref
,
1
.
0
);
default_scatter
(
pos
.
xyz
,
gl_LightSource
[
0
].
position
.
xyz
);
}
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