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
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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+5
-0
glsl_shader.c
dlls/wined3d/glsl_shader.c
+19
-0
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
;
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,6 +1377,24 @@ void pshader_glsl_tex(SHADER_OPCODE_ARG* arg) {
}
sampler_type
=
arg
->
reg_maps
->
samplers
[
sampler_code
]
&
WINED3DSP_TEXTURETYPE_MASK
;
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
:
...
...
@@ -1393,6 +1411,7 @@ void pshader_glsl_tex(SHADER_OPCODE_ARG* arg) {
FIXME
(
"Unrecognized sampler type: %#lx;
\n
"
,
sampler_type
);
break
;
}
}
}
void
pshader_glsl_texcoord
(
SHADER_OPCODE_ARG
*
arg
)
{
...
...
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