mirror of
https://github.com/Blinue/Magpie.git
synced 2026-06-24 02:04:10 +00:00
fix:优化着色器签名
This commit is contained in:
parent
9ee4e90da7
commit
c231abe376
4 changed files with 7 additions and 7 deletions
|
|
@ -955,11 +955,11 @@ UINT ResolvePass(std::string_view block, EffectDesc& desc, std::vector<std::stri
|
|||
|
||||
// main 函数
|
||||
if (passDesc.outputs.size() <= 1) {
|
||||
passHlsl.append(fmt::format("float4 __M(float4 p:SV_POSITION,float2 c:TEXCOORD):SV_TARGET"
|
||||
passHlsl.append(fmt::format("float4 __M(float2 c:TEXCOORD):SV_TARGET"
|
||||
"{{return Pass{}(c);}}", index));
|
||||
} else {
|
||||
// 多渲染目标
|
||||
passHlsl.append("void __M(float4 p:SV_POSITION,float2 c:TEXCOORD,out float4 t0:SV_TARGET0,out float4 t1:SV_TARGET1");
|
||||
passHlsl.append("void __M(float2 c:TEXCOORD,out float4 t0:SV_TARGET0,out float4 t1:SV_TARGET1");
|
||||
for (int i = 2; i < passDesc.outputs.size(); ++i) {
|
||||
passHlsl.append(fmt::format(",out float4 t{0}:SV_TARGET{0}", i));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue