mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
vkd3d-shader/ir: Allow controlling the fog source through a parameter.
This commit is contained in:
committed by
Henri Verbeet
parent
fc98cb482f
commit
1fbbc82f3a
Notes:
Henri Verbeet
2024-12-02 17:19:05 +01:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1265
@@ -1439,6 +1439,17 @@ static void parse_test_directive(struct shader_runner *runner, const char *line)
|
||||
runner->fog_mode = FOG_MODE_EXP2;
|
||||
else
|
||||
fatal_error("Invalid fog mode '%s'.\n", line);
|
||||
|
||||
if (match_string(line, "ortho", &line))
|
||||
runner->ortho_fog = true;
|
||||
if (match_string(line, "non-ortho", &line))
|
||||
runner->ortho_fog = false;
|
||||
|
||||
if (runner->fog_mode == FOG_MODE_LINEAR)
|
||||
{
|
||||
if (sscanf(line, "%f %f", &runner->fog_start, &runner->fog_end) < 2)
|
||||
fatal_error("Malformed fog constants '%s'.\n", line);
|
||||
}
|
||||
}
|
||||
else if (match_string(line, "fog-colour", &line))
|
||||
{
|
||||
@@ -1896,6 +1907,8 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_c
|
||||
runner->point_size_min = 1.0f;
|
||||
runner->point_size_max = FLT_MAX;
|
||||
runner->fog_mode = FOG_MODE_DISABLE;
|
||||
runner->fog_start = 0.0f;
|
||||
runner->fog_end = 1.0f;
|
||||
|
||||
runner->sample_mask = ~0u;
|
||||
runner->depth_bounds = false;
|
||||
|
||||
Reference in New Issue
Block a user