Hey,
Recently I wrote a basic primitive ray marcher that produces resource-cheap shadows with variable penumbras. Though, I’ve obtained inaccurate results because of inaccurate pixel world positions. I used the pixel world positions from Martins Upits’ deferred shading example. Here’s what I mean:
A still image doesn’t fully show the effect, as the shadow offset is pretty view dependant, and moves badly with camera movement, here’s a blend file to further show it.
Is there any better way to obtain pixel world positions? Thanks in advance!
EDIT: Well the first problem (the one in screenshot) was caused from false window borders, so it’s fixed so far. But I still have the problem of camera matrix taking a frame to update which shows delay artifacts.
i not understand well these script , but seem that the info of camera are grabbed in get script, that run at controller time, then applyRotation run a bit after .
there are 2 way:
or use the matrices for mouse look
or get info of cam in pre_draw (that run after the actuators)
Scene pre draw solution seems the right solution of my problem, haven’t tested yet though. Thanks!
Really hoping for a better way to pass data to glsl …