mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-10 22:17:43 +00:00
Render skyboxes with rotation-only view matrix, a few new CDrawUtil overloads, other rendering tweaks
This commit is contained in:
@@ -218,8 +218,8 @@ bool CShaderGenerator::CreateVertexShader(const CMaterial& Mat)
|
||||
ShaderCode << "// Main\n"
|
||||
<< "void main()\n"
|
||||
<< "{\n"
|
||||
<< " mat4 MVP = ModelMtx * ViewMtx * ProjMtx;\n"
|
||||
<< " mat4 MV = ModelMtx * ViewMtx;\n";
|
||||
<< " mat4 MV = ModelMtx * ViewMtx;\n"
|
||||
<< " mat4 MVP = MV * ProjMtx;\n";
|
||||
|
||||
if (VtxDesc & ePosition) ShaderCode << " gl_Position = vec4(RawPosition, 1) * MVP;\n";
|
||||
if (VtxDesc & eNormal) ShaderCode << " Normal = normalize(RawNormal.xyz * inverse(transpose(mat3(MV))));\n";
|
||||
|
||||
Reference in New Issue
Block a user