Give us an interface to the main camera via the VRCGraphics class
interested
Kilerbomb
There are many camera settings that would be really nice to have access to after runtime. An interface could be provided for this via some proxy in the VRCGraphics class. (and maybe one for the hand camera as well!)
Ideally this proxy would contain everything the normal Camera class has that doesn't pose a security risk.
Some examples of very handy use cases for this:
- Change farclip dynamically to minimize perf overhead from unnecessarily drawing distant avatars/objects
- Safe access to culling masks for user-created layers to make a lot of common visibility tricks much easier
- Set depth texture to be generated without needing a shadow-casting dir light
- Get FOV to use for unique world mechanics
- Access to a lot of useful camera matrices like cameraToWorldMatrix, worldToCameraMatrix, projectionMatrix, etc...
- Access to stereo separation for more advanced world features
...and more I'm probably not thinking of!
Log In
Momo the Monster
Merged in a post:
Expose camera.main
M.O.O.N
Please let us access main cameras transform and rotation, would be pretty helpful!
BinoWulf
One thing to add on this too, is able to use OnRenderImage ontop of the main camera so we can write PS without the need to use GrabPass. Volumetrical Lighting on Furality Umbra was done with alot of hacks and would be nicer if we could just use Unity owns systems to write to the FinalBlit instead of using hacks, more efficient and we could chain and do more creative effects and systems.
Some examples of stuff we could do:
- Baked and Realtime Volumetric Lighting;
- More modern runtime AO solutions like GTAO;
- HUDs; (Currently HUDs in most games are using Unity UI or special shaders, nothing wrong with this, but HUDs could be written directly to the camera final pass, which would make them look better and crispier)
- FFT Bloom instead of the Downsampling Bloom that PS2.0 have;
- Custom tonemapping; (Current recommended tonemapper uses old ACES specification that is known to turn blues into purple)
We can do all of this with current systems, but with hacky solutions, which would be nicer to use more commonly known APIs that Unity gives us.
Fairplex
BinoWulf This is more like a limitation of VRCGraphics.Blit() cuz for some reason they decided to block Blit on a camera.
BinoWulf
Fairplex Because the main camera is blocked to reference, It makes impossible to use OnRenderImage on it, atleast on the ways I tried. Not even just a limitation on VRCGraphics.Blit I think so.
Fairplex
BinoWulf not only the main camera. VRCGraphics.Blit on the destination is blocked globally, that mean every cameras.
Fax
Here's a related request: https://feedback.vrchat.com/feature-requests/p/forced-camera-near-distance-udon-access
TheZiver
Faxyes
Smash-ter
I'd also include things into VRC.SDK3.Rendering for command buffer potential
Edit: this would make doing something like custom post processing a bit easier to achieve.
CuteyDeer
we need yes
TheZiver
we need this >:(
Shiro K
As workaround for everyone which needs to know the vertical FOV:
This is useful when using multiple cameras in line and the cameras behind has to adjust their FOV according to the main camera (specially for desktop users which can change their FOV during runtime).
aurycat
I would really like something like this to get official access to the camera scale / stereo separation. I need the player's stereo separation for my UdonPortals prefab, which are Portal (the game) style portals that you can look & walk through. I have to make a dummy camera with the same stereo separation as the player's camera for it to look right in VR.
Right now there are a few tricks to get camera scale -- I use the AudioListener hack, where a gameobject with an AudioListener on it, for some reason, has its localScale always set to 1/camerascale . That works great for now, but its unofficial and I don't like relying on it. Having an official API would be great.
Reimajo
I need this to adjust the NearClipPlane to ensure objects are not fully blocking the view in a game I am working on. This should of course also override whatever the player has set.
__BT__
Large brain you have my vote
Load More
→