Jump to content

How to get camera World, View, Proj matrixes?


Aily
 Share

Recommended Posts

I want to build my own not-deffered renderer for LW2.24, and all works fine. FSAA and light. But for result calculation of shadow map I need WorldViewProj matrix of light (i.e. camera that renders shadow depth buffer) to compare depths of source pixel and it's position in the depth texture.

 

So, is Leadwerks have such methods?

 

P.S. before ask to your question: "Why do you need forward render?"

With deffered lighting in my project (it have sun light only) i have 100 FPS (notebook), and with forward render - 250 FPS. So... think you understand.

 

Thanks :(

"Better" is big enemy of "good"

Link to comment
Share on other sites

Try adding 10000 cubes and see if your forward renderer is still faster with your sun then. So forward renderer is only good when you make simple scenes, and not real games.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Try adding 10000 cubes and see if your forward renderer is still faster with your sun then. So forward renderer is only good when you make simple scenes, and not real games.

 

My project don't be render more than 50 000 triangles per frame. And about 20-30 DIP calls (primitives at frame), so, i think forward render will be better.

 

So. How about matrices?

"Better" is big enemy of "good"

Link to comment
Share on other sites

Lum, you don't understanding :(

 

I need something like

 

cam=createcamera()

 

world:tmatrix=getcameraWORLDmatrix(cam)

view:tmatrix=getcameraVIEWmatrix(cam)

proj:tmatrix=getcameraPROJmatrix(cam)

 

:)

"Better" is big enemy of "good"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...