mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-04 03:46:42 +01:00
VideoCommon: fix pixel shader compilation error that happens when uint output is defined
This commit is contained in:
parent
a37fd83218
commit
7118fc5b7b
@ -1326,8 +1326,20 @@ ShaderCode GeneratePixelShaderCode(APIType api_type, const ShaderHostConfig& hos
|
|||||||
if (!shader_details.custom_shader.empty())
|
if (!shader_details.custom_shader.empty())
|
||||||
{
|
{
|
||||||
out.Write("\t{{\n");
|
out.Write("\t{{\n");
|
||||||
out.Write("\t\tcustom_data.final_color = ocol0;\n");
|
if (uid_data->uint_output)
|
||||||
out.Write("\t\tocol0.xyz = {}_{}(custom_data).xyz;\n", CUSTOM_PIXELSHADER_COLOR_FUNC, i);
|
{
|
||||||
|
out.Write("\t\tcustom_data.final_color = float4(ocol0.x / 255.0, ocol0.y / 255.0, ocol0.z "
|
||||||
|
"/ 255.0, ocol0.w / 255.0);\n");
|
||||||
|
out.Write("\t\tfloat3 custom_output = {}_{}(custom_data).xyz;\n",
|
||||||
|
CUSTOM_PIXELSHADER_COLOR_FUNC, i);
|
||||||
|
out.Write("\t\tocol0.xyz = uint3(custom_output.x * 255, custom_output.y * 255, "
|
||||||
|
"custom_output.z * 255);\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
out.Write("\t\tcustom_data.final_color = ocol0;\n");
|
||||||
|
out.Write("\t\tocol0.xyz = {}_{}(custom_data).xyz;\n", CUSTOM_PIXELSHADER_COLOR_FUNC, i);
|
||||||
|
}
|
||||||
out.Write("\t}}\n\n");
|
out.Write("\t}}\n\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user