Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0d2d8479
Commit
0d2d8479
authored
Sep 03, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 03, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Don't clamp texture lookups in the GLSL fixed function fragment pipe.
parent
50e2ee73
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
25 deletions
+7
-25
glsl_shader.c
dlls/wined3d/glsl_shader.c
+7
-25
No files found.
dlls/wined3d/glsl_shader.c
View file @
0d2d8479
...
...
@@ -5507,7 +5507,7 @@ static GLuint shader_glsl_generate_ffp_fragment_shader(struct wined3d_shader_buf
{
const
char
*
texture_function
,
*
coord_mask
;
char
tex_reg_name
[
8
];
BOOL
proj
,
clamp
;
BOOL
proj
;
if
(
!
(
tex_map
&
(
1
<<
stage
)))
continue
;
...
...
@@ -5527,12 +5527,6 @@ static GLuint shader_glsl_generate_ffp_fragment_shader(struct wined3d_shader_buf
proj
=
TRUE
;
}
if
(
settings
->
op
[
stage
].
cop
==
WINED3D_TOP_BUMPENVMAP
||
settings
->
op
[
stage
].
cop
==
WINED3D_TOP_BUMPENVMAP_LUMINANCE
)
clamp
=
FALSE
;
else
clamp
=
TRUE
;
switch
(
settings
->
op
[
stage
].
tex_type
)
{
case
tex_1d
:
...
...
@@ -5624,12 +5618,8 @@ static GLuint shader_glsl_generate_ffp_fragment_shader(struct wined3d_shader_buf
shader_addline
(
buffer
,
"ret = gl_TexCoord[%u] + ret.xyxy;
\n
"
,
stage
);
}
if
(
clamp
)
shader_addline
(
buffer
,
"tex%u = clamp(%s(ps_sampler%u, ret.%s), 0.0, 1.0);
\n
"
,
stage
,
texture_function
,
stage
,
coord_mask
);
else
shader_addline
(
buffer
,
"tex%u = %s(ps_sampler%u, ret.%s);
\n
"
,
stage
,
texture_function
,
stage
,
coord_mask
);
shader_addline
(
buffer
,
"tex%u = %s(ps_sampler%u, ret.%s);
\n
"
,
stage
,
texture_function
,
stage
,
coord_mask
);
if
(
settings
->
op
[
stage
-
1
].
cop
==
WINED3D_TOP_BUMPENVMAP_LUMINANCE
)
shader_addline
(
buffer
,
"tex%u *= clamp(tex%u.z * bumpenv_lum_scale%u + bumpenv_lum_offset%u, 0.0, 1.0);
\n
"
,
...
...
@@ -5637,21 +5627,13 @@ static GLuint shader_glsl_generate_ffp_fragment_shader(struct wined3d_shader_buf
}
else
if
(
settings
->
op
[
stage
].
projected
==
proj_count3
)
{
if
(
clamp
)
shader_addline
(
buffer
,
"tex%u = clamp(%s(ps_sampler%u, gl_TexCoord[%u].xyz), 0.0, 1.0);
\n
"
,
stage
,
texture_function
,
stage
,
stage
);
else
shader_addline
(
buffer
,
"tex%u = %s(ps_sampler%u, gl_TexCoord[%u].xyz);
\n
"
,
stage
,
texture_function
,
stage
,
stage
);
shader_addline
(
buffer
,
"tex%u = %s(ps_sampler%u, gl_TexCoord[%u].xyz);
\n
"
,
stage
,
texture_function
,
stage
,
stage
);
}
else
{
if
(
clamp
)
shader_addline
(
buffer
,
"tex%u = clamp(%s(ps_sampler%u, gl_TexCoord[%u].%s), 0.0, 1.0);
\n
"
,
stage
,
texture_function
,
stage
,
stage
,
coord_mask
);
else
shader_addline
(
buffer
,
"tex%u = %s(ps_sampler%u, gl_TexCoord[%u].%s);
\n
"
,
stage
,
texture_function
,
stage
,
stage
,
coord_mask
);
shader_addline
(
buffer
,
"tex%u = %s(ps_sampler%u, gl_TexCoord[%u].%s);
\n
"
,
stage
,
texture_function
,
stage
,
stage
,
coord_mask
);
}
sprintf
(
tex_reg_name
,
"tex%u"
,
stage
);
...
...
Write
Preview
Markdown
is supported
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