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
ff683a71
Commit
ff683a71
authored
5 years ago
by
Dave Houlton
Browse files
Options
Downloads
Patches
Plain Diff
SL-12865, add bias to alpha mask values to avoid 8-bit acne
parent
eb45c054
No related branches found
Branches containing commit
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
+4
-1
4 additions, 1 deletion
...wview/app_settings/shaders/class1/deferred/materialF.glsl
with
4 additions
and
1 deletion
indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
+
4
−
1
View file @
ff683a71
...
...
@@ -230,7 +230,10 @@ void main()
vec4
diffuse_linear
=
vec4
(
srgb_to_linear
(
diffuse_srgb
.
rgb
),
diffuse_srgb
.
a
);
#if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_MASK)
if
(
diffuse_linear
.
a
<
minimum_alpha
)
// Comparing floats cast from 8-bit values, produces acne right at the 8-bit transition points
float
bias
=
0
.
001
953125
;
// 1/512, or half an 8-bit quantization
if
(
diffuse_linear
.
a
<
minimum_alpha
-
bias
)
{
discard
;
}
...
...
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