Forum

PerspectiveLookAtRect changes lighting of scene

You can see this in the Mirror patch in the girlpower folder, the image in the mirror is darker than the main scene, I’m guessing this is to do with the view vector in the shader, but fiddling around I haven’t found a solution yet. Anyone have an idea what the cause of this is?

The image in the mirror has the same colors of the source renderer, which shows the scene from a particular POV - once you set its color to 0,0,0,1 and set quad color to 0,0,1,1 -; this POV is darker than the one shown in the destination renderer because of normals and stuff.
The quad is not shaded, so you get the same colors.
One solution could be using same models for both renderers, with differently set shaders, so to try to match the lighting.

Or this is how I got it.

Thats what I was thinking, but I’ve yet to find a way of transforming the normals or the view projection in the shader to rectify it, I’m not needing a mirror, but more of a ROI for a series of ‘windows’ so I don’t have to render a full cube map at a very large resolution but instead can render some regions that can then be post processed. i.e. I need to be able to do some shadows AO in the window views.
So what I’m wondering is what I need to do to make the lighting work correctly, the camera position is in the same place as the cube map cameras, but the lighting calculation is off due to the warped view cone, how do I unwarp the cone for lighting purposes?

Is ROI a region of interest?
Anyway: have you tried this interleaved-ssao-with-cubemap-lighting? In the helppatch try deleting the filetexture node with the “cube texture goes here” IOBox. You essentially get a constant shading with an AO pass.

Ok the solution is to use the View transform from my main camera in the shader by commenting out the : View; and attaching it to the newly created pin.