I’m finally testing the new geometry instancing feature.
And I must say I’ve got a lot of problems:
On a not completely related issue:
- I’m confused with the matrix passed as parameter in the shader.
usually, I’m just doing a
position = mul(mat_modelproj, vtx_position);
and that works just fine.
but since I want to create the position of my object inside the shader, I need to decompose the matrix a bit
I tried to do :
position = mul(mat_modelview, vtx_position); position = mul(mat_projection, position);
Now I’m trying:
position = mul(wstrans_model, vtx_position); position = mul(vstrans_view, position); position = mul(mat_projection, position);
and that’s not working anymore.
I would though that:
“model -> world -> view” could be done both way ?
If I have the position of my object ( x,y,z) which matrix should I change ?
I try to pass the position and rotation information by texture. But to have a minimum of precision I can only pass 1 variable by texture ! that 6 textures for the placement.
Or I am missing something ?
I’m tried to pass these texture as a shader input.
But strangely, they seems to override the standard texture, of the object.
Is this the same thing ? Then why having two way of defining them ?