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
d4a88724
Commit
d4a88724
authored
Aug 24, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 25, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Load projected textures in fragment shaders.
parent
0b7a96e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
17 deletions
+41
-17
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+7
-2
glsl_shader.c
dlls/wined3d/glsl_shader.c
+34
-15
No files found.
dlls/wined3d/arb_program_shader.c
View file @
d4a88724
...
...
@@ -642,8 +642,13 @@ void pshader_hw_tex(SHADER_OPCODE_ARG* arg) {
else
reg_sampler_code
=
src
[
1
]
&
D3DSP_REGNUM_MASK
;
shader_addline
(
buffer
,
"TEX %s, %s, texture[%lu], 2D;
\n
"
,
reg_dest
,
reg_coord
,
reg_sampler_code
);
if
(
This
->
wineD3DDevice
->
stateBlock
->
textureState
[
reg_sampler_code
][
D3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
)
{
shader_addline
(
buffer
,
"TXP %s, %s, texture[%lu], 2D;
\n
"
,
reg_dest
,
reg_coord
,
reg_sampler_code
);
}
else
{
shader_addline
(
buffer
,
"TEX %s, %s, texture[%lu], 2D;
\n
"
,
reg_dest
,
reg_coord
,
reg_sampler_code
);
}
}
void
pshader_hw_texcoord
(
SHADER_OPCODE_ARG
*
arg
)
{
...
...
dlls/wined3d/glsl_shader.c
View file @
d4a88724
...
...
@@ -1377,21 +1377,40 @@ void pshader_glsl_tex(SHADER_OPCODE_ARG* arg) {
}
sampler_type
=
arg
->
reg_maps
->
samplers
[
sampler_code
]
&
WINED3DSP_TEXTURETYPE_MASK
;
switch
(
sampler_type
)
{
case
WINED3DSTT_2D
:
shader_addline
(
buffer
,
"%s = texture2D(%s, %s.st);
\n
"
,
dst_str
,
sampler_str
,
coord_reg
);
break
;
case
WINED3DSTT_CUBE
:
shader_addline
(
buffer
,
"%s = textureCube(%s, %s.stp);
\n
"
,
dst_str
,
sampler_str
,
coord_reg
);
break
;
case
WINED3DSTT_VOLUME
:
shader_addline
(
buffer
,
"%s = texture3D(%s, %s.stp);
\n
"
,
dst_str
,
sampler_str
,
coord_reg
);
break
;
default:
shader_addline
(
buffer
,
"%s = unrecognized_stype(%s, %s.stp);
\n
"
,
dst_str
,
sampler_str
,
coord_reg
);
FIXME
(
"Unrecognized sampler type: %#lx;
\n
"
,
sampler_type
);
break
;
if
(
This
->
wineD3DDevice
->
stateBlock
->
textureState
[
sampler_code
][
D3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
)
{
switch
(
sampler_type
)
{
case
WINED3DSTT_2D
:
shader_addline
(
buffer
,
"%s = texture2DProj(%s, %s);
\n
"
,
dst_str
,
sampler_str
,
coord_reg
);
break
;
case
WINED3DSTT_CUBE
:
shader_addline
(
buffer
,
"%s = textureCubeProj(%s, %s);
\n
"
,
dst_str
,
sampler_str
,
coord_reg
);
break
;
case
WINED3DSTT_VOLUME
:
shader_addline
(
buffer
,
"%s = texture3DProj(%s, %s);
\n
"
,
dst_str
,
sampler_str
,
coord_reg
);
break
;
default:
shader_addline
(
buffer
,
"%s = unrecognized_stype(%s, %s.stp);
\n
"
,
dst_str
,
sampler_str
,
coord_reg
);
FIXME
(
"Unrecognized sampler type: %#lx;
\n
"
,
sampler_type
);
break
;
}
}
else
{
switch
(
sampler_type
)
{
case
WINED3DSTT_2D
:
shader_addline
(
buffer
,
"%s = texture2D(%s, %s.st);
\n
"
,
dst_str
,
sampler_str
,
coord_reg
);
break
;
case
WINED3DSTT_CUBE
:
shader_addline
(
buffer
,
"%s = textureCube(%s, %s.stp);
\n
"
,
dst_str
,
sampler_str
,
coord_reg
);
break
;
case
WINED3DSTT_VOLUME
:
shader_addline
(
buffer
,
"%s = texture3D(%s, %s.stp);
\n
"
,
dst_str
,
sampler_str
,
coord_reg
);
break
;
default:
shader_addline
(
buffer
,
"%s = unrecognized_stype(%s, %s.stp);
\n
"
,
dst_str
,
sampler_str
,
coord_reg
);
FIXME
(
"Unrecognized sampler type: %#lx;
\n
"
,
sampler_type
);
break
;
}
}
}
...
...
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