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
5b7d8b61
Commit
5b7d8b61
authored
2 years ago
by
Ptolemy
Browse files
Options
Downloads
Patches
Plain Diff
SL-17702: PBR: Optimize BRDF diffuse
parent
5a346844
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
+2
-1
2 additions, 1 deletion
...ew/app_settings/shaders/class1/deferred/deferredUtil.glsl
with
2 additions
and
1 deletion
indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
+
2
−
1
View file @
5b7d8b61
...
@@ -44,6 +44,7 @@ uniform mat4 inv_proj;
...
@@ -44,6 +44,7 @@ uniform mat4 inv_proj;
uniform
vec2
screen_res
;
uniform
vec2
screen_res
;
const
float
M_PI
=
3
.
14159265
;
const
float
M_PI
=
3
.
14159265
;
const
float
ONE_OVER_PI
=
0
.
3183098861
;
vec3
srgb_to_linear
(
vec3
cs
);
vec3
srgb_to_linear
(
vec3
cs
);
...
@@ -442,7 +443,7 @@ void initMaterial( vec3 diffuse, vec3 packedORM, out float alphaRough, out vec3
...
@@ -442,7 +443,7 @@ void initMaterial( vec3 diffuse, vec3 packedORM, out float alphaRough, out vec3
vec3
BRDFDiffuse
(
vec3
color
)
vec3
BRDFDiffuse
(
vec3
color
)
{
{
return
color
/
M
_PI
;
return
color
*
ONE_OVER
_PI
;
}
}
vec3
BRDFLambertian
(
vec3
reflect0
,
vec3
reflect90
,
vec3
c_diff
,
float
specWeight
,
float
vh
)
vec3
BRDFLambertian
(
vec3
reflect0
,
vec3
reflect90
,
vec3
c_diff
,
float
specWeight
,
float
vh
)
...
...
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