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
79b92a6d
Commit
79b92a6d
authored
Jul 20, 2023
by
Petrichor Park
Committed by
Alexandre Julliard
Aug 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use ffp_normalize in shader_glsl_ffp_vertex_lighting.
parent
b79c4e7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
glsl_shader.c
dlls/wined3d/glsl_shader.c
+5
-5
No files found.
dlls/wined3d/glsl_shader.c
View file @
79b92a6d
...
...
@@ -8913,7 +8913,7 @@ static void shader_glsl_ffp_vertex_lighting(struct wined3d_string_buffer *buffer
shader_addline
(
buffer
,
"}
\n
"
);
continue
;
}
shader_addline
(
buffer
,
"dir = normalize(dir);
\n
"
);
shader_addline
(
buffer
,
"dir =
ffp_
normalize(dir);
\n
"
);
shader_glsl_ffp_vertex_lighting_footer
(
buffer
,
settings
,
idx
,
legacy_lighting
);
shader_addline
(
buffer
,
"}
\n
"
);
}
...
...
@@ -8934,8 +8934,8 @@ static void shader_glsl_ffp_vertex_lighting(struct wined3d_string_buffer *buffer
{
shader_addline
(
buffer
,
"if (dst.y <= ffp_light[%u].range)
\n
{
\n
"
,
idx
);
}
shader_addline
(
buffer
,
"dir = normalize(dir);
\n
"
);
shader_addline
(
buffer
,
"t = dot(-dir, normalize(ffp_light[%u].direction));
\n
"
,
idx
);
shader_addline
(
buffer
,
"dir =
ffp_
normalize(dir);
\n
"
);
shader_addline
(
buffer
,
"t = dot(-dir,
ffp_
normalize(ffp_light[%u].direction));
\n
"
,
idx
);
shader_addline
(
buffer
,
"if (t > ffp_light[%u].cos_htheta) att = 1.0;
\n
"
,
idx
);
shader_addline
(
buffer
,
"else if (t <= ffp_light[%u].cos_hphi) att = 0.0;
\n
"
,
idx
);
shader_addline
(
buffer
,
"else att = pow((t - ffp_light[%u].cos_hphi)"
...
...
@@ -8965,7 +8965,7 @@ static void shader_glsl_ffp_vertex_lighting(struct wined3d_string_buffer *buffer
if
(
!
settings
->
normal
)
continue
;
shader_addline
(
buffer
,
"att = 1.0;
\n
"
);
shader_addline
(
buffer
,
"dir = normalize(ffp_light[%u].direction.xyz);
\n
"
,
idx
);
shader_addline
(
buffer
,
"dir =
ffp_
normalize(ffp_light[%u].direction.xyz);
\n
"
,
idx
);
shader_glsl_ffp_vertex_lighting_footer
(
buffer
,
settings
,
idx
,
legacy_lighting
);
}
...
...
@@ -8975,7 +8975,7 @@ static void shader_glsl_ffp_vertex_lighting(struct wined3d_string_buffer *buffer
if
(
!
settings
->
normal
)
continue
;
shader_addline
(
buffer
,
"att = 1.0;
\n
"
);
shader_addline
(
buffer
,
"dir = normalize(ffp_light[%u].position.xyz);
\n
"
,
idx
);
shader_addline
(
buffer
,
"dir =
ffp_
normalize(ffp_light[%u].position.xyz);
\n
"
,
idx
);
shader_glsl_ffp_vertex_lighting_footer
(
buffer
,
settings
,
idx
,
legacy_lighting
);
}
...
...
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