Board index FlightGear Development Effects and shaders

Camera orientation

An exciting "new" option in FlightGear, that includes reflections, lightmaps, the particle system etc.. A lot is yet to be discovered/implemented!

Camera orientation

Postby merspieler » Thu Aug 12, 2021 9:52 pm

How do I get the camera orientation in the shader?

There's /sim/current-view/raw-orientation[0-3] but those seem to be updated rather slowly which doesn't help with my case.
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2241
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: Camera orientation

Postby eatdirt » Thu Dec 02, 2021 9:35 pm

On 2020.4.0, there are a few uniforms the compositor propagates:
Code: Select all
new osg::Uniform("fg_CameraPositionCart", osg::Vec3f()),
simgear/scene/viewer/Compositor.cxx:    new osg::Uniform("fg_CameraPositionGeod", osg::Vec3f()),
simgear/scene/viewer/Compositor.cxx:    new osg::Uniform("fg_CameraDistanceToEarthCenter", 0.0f),
simgear/scene/viewer/Compositor.cxx:    new osg::Uniform("fg_CameraWorldUp", osg::Vec3f()),
simgear/scene/viewer/Compositor.cxx:    new osg::Uniform("fg_CameraViewUp", osg::Vec3f()),


I don't know if they are what you looking for! Good luck!
eatdirt
 
Posts: 1012
Joined: Wed Aug 15, 2018 3:06 pm


Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 3 guests