Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

Issue Matrix multiplication in Directx vs OpenGL.

$
0
0

@11110 wrote:

This worked in DirectX & OpenGL platform. But it repeat the same calculate every vertex, which is not efficient.

//Shader
float4x4 matWVP = mul(World, mul(View, Proj));
o.position = mul(i.position, matWVP);

But when i precalculate on CPU and pass into GPU, the rendering become weird.

_effect.Parameters[WVP].SetValue(world*view*projection);
shadercode

//Shader
o.position = mul(i.position, WVP);

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles