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
693d9ded
Commit
693d9ded
authored
Jan 10, 2009
by
Stefan Dösinger
Committed by
Alexandre Julliard
Feb 11, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Properly set the fog frag coord according to the FOGTABLEMODE.
This also fixes the test that an earlier patch broke, so the todo_wine can be removed again.
parent
8dcd5128
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
10 deletions
+18
-10
visual.c
dlls/d3d9/tests/visual.c
+0
-6
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+9
-2
glsl_shader.c
dlls/wined3d/glsl_shader.c
+9
-2
No files found.
dlls/d3d9/tests/visual.c
View file @
693d9ded
...
...
@@ -1539,17 +1539,11 @@ static void fog_with_shader_test(IDirect3DDevice9 *device)
/* As the red and green component are the result of blending use 5% tolerance on the expected value */
color
=
getPixelColor
(
device
,
128
,
240
);
if
(
test_data
[
i
].
vshader
==
1
&&
test_data
[
i
].
tfog
==
0
&&
color
!=
test_data
[
i
].
color
[
j
])
{
todo_wine
ok
(
color_match
(
color
,
test_data
[
i
].
color
[
j
],
13
),
"fog vs%i ps%i fvm%i ftm%i %d: got color %08x, expected %08x +-5%%(todo)
\n
"
,
test_data
[
i
].
vshader
,
test_data
[
i
].
pshader
,
test_data
[
i
].
vfog
,
test_data
[
i
].
tfog
,
j
,
color
,
test_data
[
i
].
color
[
j
]);
}
else
{
ok
(
color_match
(
color
,
test_data
[
i
].
color
[
j
],
13
),
"fog vs%i ps%i fvm%i ftm%i %d: got color %08x, expected %08x +-5%%
\n
"
,
test_data
[
i
].
vshader
,
test_data
[
i
].
pshader
,
test_data
[
i
].
vfog
,
test_data
[
i
].
tfog
,
j
,
color
,
test_data
[
i
].
color
[
j
]);
}
}
}
/* reset states */
hr
=
IDirect3DDevice9_SetVertexShader
(
device
,
NULL
);
...
...
dlls/wined3d/arb_program_shader.c
View file @
693d9ded
...
...
@@ -2068,9 +2068,16 @@ static GLuint shader_arb_generate_vshader(IWineD3DVertexShader *iface, SHADER_BU
/* Base Shader Body */
shader_generate_main
(
(
IWineD3DBaseShader
*
)
This
,
buffer
,
reg_maps
,
function
);
/* If this shader doesn't use fog copy the z coord to the fog coord so that we can use table fog */
if
(
!
reg_maps
->
fog
)
/* The D3DRS_FOGTABLEMODE render state defines if the shader-generated fog coord is used
* or if the fragment depth is used. If the fragment depth is used(FOGTABLEMODE != NONE),
* the fog frag coord is thrown away. If the fog frag coord is used, but not written by
* the shader, it is set to 0.0(fully fogged, since start = 1.0, end = 0.0)
*/
if
(
args
->
fog_src
==
VS_FOG_Z
)
{
shader_addline
(
buffer
,
"MOV result.fogcoord, TMP_OUT.z;
\n
"
);
}
else
if
(
!
reg_maps
->
fog
)
{
shader_addline
(
buffer
,
"MOV result.fogcoord, 0.0;
\n
"
);
}
/* Write the final position.
*
...
...
dlls/wined3d/glsl_shader.c
View file @
693d9ded
...
...
@@ -3912,9 +3912,16 @@ static GLuint shader_glsl_generate_vshader(IWineD3DVertexShader *iface, SHADER_B
if
(
reg_maps
->
shader_version
>=
WINED3DVS_VERSION
(
3
,
0
))
shader_addline
(
buffer
,
"order_ps_input(OUT);
\n
"
);
else
shader_addline
(
buffer
,
"order_ps_input();
\n
"
);
/* If this shader doesn't use fog copy the z coord to the fog coord so that we can use table fog */
if
(
!
reg_maps
->
fog
)
/* The D3DRS_FOGTABLEMODE render state defines if the shader-generated fog coord is used
* or if the fragment depth is used. If the fragment depth is used(FOGTABLEMODE != NONE),
* the fog frag coord is thrown away. If the fog frag coord is used, but not written by
* the shader, it is set to 0.0(fully fogged, since start = 1.0, end = 0.0)
*/
if
(
args
->
fog_src
==
VS_FOG_Z
)
{
shader_addline
(
buffer
,
"gl_FogFragCoord = gl_Position.z;
\n
"
);
}
else
if
(
!
reg_maps
->
fog
)
{
shader_addline
(
buffer
,
"gl_FogFragCoord = 0.0;
\n
"
);
}
/* Write the final position.
*
...
...
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