2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-21 20:19:12 +00:00

Implement HLSL CFluidPlaneShader

This commit is contained in:
Jack Andersen
2017-08-07 20:43:27 -10:00
parent 3650a58a1e
commit d68d3c26b1
3 changed files with 481 additions and 8 deletions

View File

@@ -27,6 +27,7 @@ static const char* VS =
"\n"
"struct VertToFrag\n"
"{\n"
" float4 pos : [[ position ]];\n"
" float4 mvPos;\n"
" float4 mvNorm;\n"
" float4 mvBinorm;\n"
@@ -40,7 +41,7 @@ static const char* VS =
"{\n"
" VertToFrag vtf;\n"
" vtf.mvPos = fu.mv * float4(v.posIn.xyz, 1.0);\n"
" gl_Position = fu.proj * vtf.mvPos;\n"
" vtf.pos = fu.proj * vtf.mvPos;\n"
" vtf.mvNorm = fu.mvNorm * v.normalIn;\n"
" vtf.mvBinorm = fu.mvNorm * v.binormalIn;\n"
" vtf.mvTangent = fu.mvNorm * v.tangentIn;\n"
@@ -106,6 +107,7 @@ static const char* FS =
"\n"
"struct VertToFrag\n"
"{\n"
" float4 pos : [[ position ]];\n"
" float4 mvPos;\n"
" float4 mvNorm;\n"
" float4 mvBinorm;\n"
@@ -477,4 +479,4 @@ boo::IShaderDataBinding* CFluidPlaneShader::BuildBinding(boo::MetalDataFactory::
ubufSizes, texCount, texs, nullptr, nullptr);
}
}
}