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
108fd508
Commit
108fd508
authored
2 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Really fix macos shaders this time
parent
7327624c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/llrender/llshadermgr.cpp
+2
-0
2 additions, 0 deletions
indra/llrender/llshadermgr.cpp
indra/newview/app_settings/shaders/class1/alchemy/toneMapF.glsl
+3
-1
3 additions, 1 deletion
...newview/app_settings/shaders/class1/alchemy/toneMapF.glsl
with
5 additions
and
1 deletion
indra/llrender/llshadermgr.cpp
+
2
−
0
View file @
108fd508
...
...
@@ -767,8 +767,10 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
//backwards compatibility with legacy texture lookup syntax
extra_code_text
[
extra_code_count
++
]
=
strdup
(
"#define texture2D texture
\n
"
);
extra_code_text
[
extra_code_count
++
]
=
strdup
(
"#define texture3D texture
\n
"
);
extra_code_text
[
extra_code_count
++
]
=
strdup
(
"#define textureCube texture
\n
"
);
extra_code_text
[
extra_code_count
++
]
=
strdup
(
"#define texture2DLod textureLod
\n
"
);
extra_code_text
[
extra_code_count
++
]
=
strdup
(
"#define texture3DLod textureLod
\n
"
);
extra_code_text
[
extra_code_count
++
]
=
strdup
(
"#define texture2DLodOffset textureLodOffset
\n
"
);
extra_code_text
[
extra_code_count
++
]
=
strdup
(
"#define shadow2D(a,b) vec2(texture(a,b))
\n
"
);
...
...
This diff is collapsed.
Click to expand it.
indra/newview/app_settings/shaders/class1/alchemy/toneMapF.glsl
+
3
−
1
View file @
108fd508
...
...
@@ -22,6 +22,8 @@
* $/LicenseInfo$
*/
#extension GL_ARB_shader_texture_lod : enable
/*[EXTRA_CODE_HERE]*/
#ifdef DEFINE_GL_FRAGCOLOR
...
...
@@ -231,7 +233,7 @@ void main()
//see https://developer.nvidia.com/gpugems/GPUGems2/gpugems2_chapter24.html
vec3
scale
=
(
vec3
(
colorgrade_lut_size
.
x
)
-
1
.
0
)
/
vec3
(
colorgrade_lut_size
.
x
);
vec3
offset
=
1
.
0
/
(
2
.
0
*
vec3
(
colorgrade_lut_size
.
x
));
diff
=
vec4
(
linear_to_srgb
(
texture
2
DLod
(
colorgrade_lut
,
scale
*
diff
.
rgb
+
offset
,
0
).
rgb
),
diff
.
a
);
diff
=
vec4
(
linear_to_srgb
(
texture
3
DLod
(
colorgrade_lut
,
scale
*
diff
.
rgb
+
offset
,
0
).
rgb
),
diff
.
a
);
#endif
frag_color
=
diff
;
...
...
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