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
878e0253
Commit
878e0253
authored
Mar 22, 2007
by
Fabian Bieler
Committed by
Alexandre Julliard
Mar 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove fog coordinate clamping in the vertex shader.
parent
7cedd56d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
12 deletions
+9
-12
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+1
-1
vertexshader.c
dlls/wined3d/vertexshader.c
+8
-11
No files found.
dlls/wined3d/arb_program_shader.c
View file @
878e0253
...
...
@@ -313,7 +313,7 @@ static void vshader_program_add_param(SHADER_OPCODE_ARG *arg, const DWORD param,
IWineD3DVertexShaderImpl
*
This
=
(
IWineD3DVertexShaderImpl
*
)
arg
->
shader
;
/* oPos, oFog and oPts in D3D */
static
const
char
*
const
hwrastout_reg_names
[]
=
{
"TMP_OUT"
,
"
TMP_FOG
"
,
"result.pointsize"
};
static
const
char
*
const
hwrastout_reg_names
[]
=
{
"TMP_OUT"
,
"
result.fogcoord
"
,
"result.pointsize"
};
DWORD
reg
=
param
&
WINED3DSP_REGNUM_MASK
;
DWORD
regtype
=
shader_get_regtype
(
param
);
...
...
dlls/wined3d/vertexshader.c
View file @
878e0253
...
...
@@ -336,11 +336,11 @@ static VOID IWineD3DVertexShaderImpl_GenerateShader(
if
(
This
->
baseShader
.
hex_version
>=
WINED3DVS_VERSION
(
3
,
0
))
vshader_glsl_output_unpack
(
&
buffer
,
This
->
semantics_out
);
/*
Clamp the fog from 0 to 1 if it's used
*/
if
(
reg_maps
->
fog
)
{
/*
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
)
This
->
usesFog
=
1
;
shader_addline
(
&
buffer
,
"gl_FogFragCoord = clamp(gl_FogFragCoord, 0.0, 1.0);
\n
"
);
}
else
shader_addline
(
&
buffer
,
"gl_FogFragCoord = gl_Position.z;
\n
"
);
/* Write the final position.
*
...
...
@@ -382,17 +382,14 @@ static VOID IWineD3DVertexShaderImpl_GenerateShader(
/* We need a constant to fixup the final position */
shader_addline
(
&
buffer
,
"PARAM posFixup = program.env[%d];
\n
"
,
ARB_SHADER_PRIVCONST_POS
);
if
(
reg_maps
->
fog
)
{
This
->
usesFog
=
1
;
shader_addline
(
&
buffer
,
"TEMP TMP_FOG;
\n
"
);
}
/* Base Shader Body */
shader_generate_main
(
(
IWineD3DBaseShader
*
)
This
,
&
buffer
,
reg_maps
,
pFunction
);
/*
Make sure the fog value is positive - values above 1.0 are ignored
*/
/*
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
)
shader_addline
(
&
buffer
,
"MAX result.fogcoord, TMP_FOG, 0.0;
\n
"
);
This
->
usesFog
=
1
;
else
shader_addline
(
&
buffer
,
"MOV result.fogcoord, TMP_OUT.z;
\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