Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
8fc2cfe4
Commit
8fc2cfe4
authored
Aug 17, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fix projected bump mapping.
parent
6c6a6a2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+17
-3
No files found.
dlls/wined3d/arb_program_shader.c
View file @
8fc2cfe4
...
...
@@ -2756,9 +2756,23 @@ static GLuint gen_arbfp_ffp_shader(struct ffp_settings *settings, IWineD3DStateB
shader_addline
(
&
buffer
,
"DP3 ret.r, arg1, tex%u;
\n
"
,
stage
-
1
);
shader_addline
(
&
buffer
,
"SWZ arg1, bumpmat%u, y, w, 0, 0;
\n
"
,
stage
-
1
);
shader_addline
(
&
buffer
,
"DP3 ret.g, arg1, tex%u;
\n
"
,
stage
-
1
);
shader_addline
(
&
buffer
,
"ADD ret, ret, fragment.texcoord[%u];
\n
"
,
stage
);
shader_addline
(
&
buffer
,
"%s%s tex%u, ret, texture[%u], %s;
\n
"
,
instr
,
sat
,
stage
,
stage
,
textype
);
/* with projective textures, texbem only divides the static texture coord, not the displacement,
* so we can't let the GL handle this.
*/
if
(
settings
->
op
[
stage
].
projected
!=
proj_none
)
{
/* Note: Currently always divide by .a because the vertex pipeline moves the correct value
* into the 4th component
*/
shader_addline
(
&
buffer
,
"RCP arg1.a, fragment.texcoord[%u].a;
\n
"
,
stage
);
shader_addline
(
&
buffer
,
"MUL arg1.rg, fragment.texcoord[%u], arg1.a;
\n
"
,
stage
);
shader_addline
(
&
buffer
,
"ADD ret, ret, arg1;
\n
"
);
}
else
{
shader_addline
(
&
buffer
,
"ADD ret, ret, fragment.texcoord[%u];
\n
"
,
stage
);
}
shader_addline
(
&
buffer
,
"TEX%s tex%u, ret, texture[%u], %s;
\n
"
,
sat
,
stage
,
stage
,
textype
);
if
(
settings
->
op
[
stage
-
1
].
cop
==
WINED3DTOP_BUMPENVMAPLUMINANCE
)
{
shader_addline
(
&
buffer
,
"MAD ret.r, tex%u.b, luminance%u.r, luminance%u.g;
\n
"
,
stage
-
1
,
stage
-
1
,
stage
-
1
);
...
...
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