unreal

08-09-2004, 07:13 AM

hello!

I was cheking some demos (like dispersion demo) from nVidias Site.

And in the OGLSLang vertex shader program i found this:

// transform eye position to world space

vec4 worldEyePos = viewInverse * eyePos;

viewInverse and eyePos are uniforms. But how I will find the viewInverce matrix?

I have seen a lot of demos that uses the view Invert Matrix. BUt I dont undersatnd how to find it! Some resource i find saying just make the matrix from M[i][j] to M[j][i] some others saying other ways to do it! I am confuzed! Can someone tell me how i can calculate the viewInverse Matrix?

thanks in advance!

I was cheking some demos (like dispersion demo) from nVidias Site.

And in the OGLSLang vertex shader program i found this:

// transform eye position to world space

vec4 worldEyePos = viewInverse * eyePos;

viewInverse and eyePos are uniforms. But how I will find the viewInverce matrix?

I have seen a lot of demos that uses the view Invert Matrix. BUt I dont undersatnd how to find it! Some resource i find saying just make the matrix from M[i][j] to M[j][i] some others saying other ways to do it! I am confuzed! Can someone tell me how i can calculate the viewInverse Matrix?

thanks in advance!