Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Testicular Slingshot
Alchemy Viewer
Commits
c6d2c831
Commit
c6d2c831
authored
Feb 19, 2020
by
Rye Mutt
🍞
Browse files
Import Beq Janus's changes for improved preview lighting
parent
660ff6ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
indra/newview/app_settings/shaders/class1/objects/previewV.glsl
View file @
c6d2c831
...
...
@@ -91,8 +91,8 @@ void main()
// Collect normal lights (need to be divided by two, as we later multiply by 2)
col
.
rgb
+=
light_diffuse
[
1
].
rgb
*
calcDirectionalLight
(
norm
,
light_position
[
1
].
xyz
);
col
.
rgb
+=
light_diffuse
[
2
].
rgb
*
calc
PointLightOrSpotLight
(
pos
.
xyz
,
norm
,
light_position
[
2
],
light_direction
[
2
],
light_attenuation
[
2
].
x
,
light_attenuation
[
2
].
z
);
col
.
rgb
+=
light_diffuse
[
3
].
rgb
*
calc
PointLightOrSpotLight
(
pos
.
xyz
,
norm
,
light_position
[
3
],
light_direction
[
3
],
light_attenuation
[
3
].
x
,
light_attenuation
[
3
].
z
);
col
.
rgb
+=
light_diffuse
[
2
].
rgb
*
calc
DirectionalLight
(
norm
,
light_position
[
2
].
xy
z
);
col
.
rgb
+=
light_diffuse
[
3
].
rgb
*
calc
DirectionalLight
(
norm
,
light_position
[
3
].
xy
z
);
col
/=
2
.
0
;
vertex_color
=
col
*
color
;
}
indra/newview/pipeline.cpp
View file @
c6d2c831
...
...
@@ -6099,7 +6099,7 @@ void LLPipeline::enableLightsPreview()
light
->
enable
();
light
->
setPosition
(
light_pos
);
light
->
setDiffuse
(
diffuse0
);
light
->
setAmbient
(
LLColor4
::
black
);
light
->
setAmbient
(
ambient
);
light
->
setSpecular
(
specular0
);
light
->
setSpotExponent
(
0.
f
);
light
->
setSpotCutoff
(
180.
f
);
...
...
@@ -6110,7 +6110,7 @@ void LLPipeline::enableLightsPreview()
light
->
enable
();
light
->
setPosition
(
light_pos
);
light
->
setDiffuse
(
diffuse1
);
light
->
setAmbient
(
LLColor4
::
black
);
light
->
setAmbient
(
ambient
);
light
->
setSpecular
(
specular1
);
light
->
setSpotExponent
(
0.
f
);
light
->
setSpotCutoff
(
180.
f
);
...
...
@@ -6120,7 +6120,7 @@ void LLPipeline::enableLightsPreview()
light
->
enable
();
light
->
setPosition
(
light_pos
);
light
->
setDiffuse
(
diffuse2
);
light
->
setAmbient
(
LLColor4
::
black
);
light
->
setAmbient
(
ambient
);
light
->
setSpecular
(
specular2
);
light
->
setSpotExponent
(
0.
f
);
light
->
setSpotCutoff
(
180.
f
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment