Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
XDG Integration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
JennaHuntsman
XDG Integration
Commits
b6a9088f
Commit
b6a9088f
authored
3 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
I forgot alpha blend materials
parent
69dee51c
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/materialF.glsl
+14
-11
14 additions, 11 deletions
...wview/app_settings/shaders/class1/deferred/materialF.glsl
with
14 additions
and
11 deletions
indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
+
14
−
11
View file @
b6a9088f
...
...
@@ -286,7 +286,6 @@ void main()
shadow
=
sampleDirectionalShadow
(
pos
.
xyz
,
norm
.
xyz
,
pos_screen
);
#endif
spec
=
final_specular
;
vec4
diffuse
=
final_color
;
float
envIntensity
=
final_normal
.
z
;
...
...
@@ -334,7 +333,9 @@ void main()
float
glare
=
0
.
0
;
if
(
spec
.
a
>
0
.
0
)
// specular reflection
final_specular
.
rgb
=
srgb_to_linear
(
final_specular
.
rgb
);
// SL-14035
if
(
final_specular
.
a
>
0
.
0
)
// specular reflection
{
/* // Reverting this specular calculation to previous 'dumbshiny' version - DJH 6/17/2020
// Preserving the refactored version as a comment for potential reconsideration,
...
...
@@ -342,7 +343,7 @@ void main()
//
// If you're reading this in 2021+, feel free to obliterate.
*/
#if
0
#if
1
vec3
npos
=
-
normalize
(
pos
.
xyz
);
//vec3 ref = dot(pos+lv, norm);
...
...
@@ -358,18 +359,22 @@ void main()
if
(
nh
>
0
.
0
)
{
float scol = fres*texture2D(lightFunc, vec2(nh,
spec
.a)).r*gt / (nh*da);
vec3 sp = sun_contrib*scol / 6.0
f
;
float
scol
=
fres
*
texture2D
(
lightFunc
,
vec2
(
nh
,
final_specular
.
a
)).
r
*
gt
/
(
nh
*
da
);
vec3
sp
=
sun_contrib
*
scol
/
6
.
0
;
sp
=
clamp
(
sp
,
vec3
(
0
),
vec3
(
1
));
bloom += dot(sp, sp) / 4.0;
color += sp * spec.rgb;
glare
+=
dot
(
sp
,
sp
)
/
4
.
0
;
vec3
spec_contrib
=
sp
*
final_specular
.
rgb
;
color
.
rgb
=
srgb_to_linear
(
color
.
rgb
);
color
.
rgb
+=
spec_contrib
;
color
.
rgb
=
linear_to_srgb
(
color
.
rgb
);
}
#else
float
sa
=
dot
(
refnormpersp
,
sun_dir
.
xyz
);
vec3
dumbshiny
=
sunlit
*
shadow
*
(
texture2D
(
lightFunc
,
vec2
(
sa
,
spec
.
a
)).
r
);
vec3
dumbshiny
=
sunlit
*
shadow
*
(
texture2D
(
lightFunc
,
vec2
(
sa
,
final_specular
.
a
)).
r
);
// add the two types of shiny together
vec3
spec_contrib
=
dumbshiny
*
spec
.
rgb
;
vec3
spec_contrib
=
dumbshiny
*
final_specular
.
rgb
;
bloom
=
dot
(
spec_contrib
,
spec_contrib
)
/
6
;
glare
=
max
(
spec_contrib
.
r
,
spec_contrib
.
g
);
...
...
@@ -406,8 +411,6 @@ void main()
vec3
light
=
vec3
(
0
,
0
,
0
);
final_specular
.
rgb
=
srgb_to_linear
(
final_specular
.
rgb
);
// SL-14035
#define LIGHT_LOOP(i) light.rgb += calcPointLightOrSpotLight(light_diffuse[i].rgb, npos, diffuse.rgb, final_specular, pos.xyz, norm.xyz, light_position[i], light_direction[i].xyz, light_attenuation[i].x, light_attenuation[i].y, light_attenuation[i].z, glare, light_attenuation[i].w );
LIGHT_LOOP
(
1
)
...
...
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