▲ 1 r/unity

Profiling Lenovo Tablet : Large changes in rendering time in a simple static scene.

I'm working on a custom lighting system intended for console, PC, and mobile devices. I have a sample scene that I use for profiling; this scene contains (after trimming it down in an attempt to figure out this issue) some static scenery and a single 'lamp' (not Unity light) which performs screen-space lighting over a given area. The lamp slowly orbits the scene but always covers more or less the same area, and in any case its motion does not correspond to the behaviour observed in the profiler:

https://preview.redd.it/1f3rkv9wnyjh1.png?width=667&format=png&auto=webp&s=179e41f497825296f38a6c6385f00b4a08e010b1

I managed to grab this shot before it scrolled off the screen.

When the app first launched, the graph looked as it did on the right hand side. After running for a couple of minutes without anything changing, it suddenly dropped to what it looks like on the left hand side (comfortably within the time needed for 60fps; Application.TargetFrameRate is set to 30 at the moment).

After another minute or so, the above happened, and rendering time more or less quadrupled, taking it back to 30fps. That apparent spike in script time is a red herring; there are no scripts running other than the one making the light move and the ones handling the lighting itself (which don't/can't exhibit spiky behaviour)

Nothing whatsoever happened within the scene to prompt that change. The lamp performed several orbits in both sections of the graph and nothing else is happening.

If I set the target frame rate to 60, things get even worse. Reported render time goes through a regular pattern of:

  • One frame sub 16ms
  • Three frames over 33ms
  • One frame sub 16ms
  • Three frames over 33ms
  • ...

By contrast, profiling on my trusty Pixel 6 Pro, the same scene runs at a very consistent sub-5ms (200fps), and even stressing it with an unreasonable number of lights only raises that to 6ms.

Could it be self-throttling?

A few years ago I had a similar issue on iPhone: the game would run comfortably under 8ms frame time, at which point the OS would throttle the device and the frame time would spike to over the 16ms threshold for smooth gameplay.

Any suggestions? I feel as though it could just be a matter of setting the right flags when doing a build - it's definitely not the scripts or the amount of rendering I'm asking it to do that's causing these wild sings in performance.

Thanks in advance.

reddit.com
u/whentheworldquiets — 3 days ago
▲ 2 r/unity

How can I persuade rendertextures created via RenderTextureDescriptor to behave like those created in the project folder via the editor?

I have created a custom lighting pipeline that uses a number of rendertextures. If those rendertextures are created via the editor, all is well.

However, if I create them at runtime via a RenderTextureDescriptor, despite them appearing identical in the inspector (and debug inspector), the contents will be flipped in the Y at each step.

Obviously I can compensate for that, but the inconsistency is bothering me. I feel as though I must be missing something when creating the rendertextures from code, but I can't see any differences.

NB: I'm aware of the differing GL/DX conventions and the steps Unity takes to unify them. It just doesn't seem to be doing the same thing with runtime-generated rendertextures.

reddit.com
u/whentheworldquiets — 10 days ago

Kind of spoiled this for myself. I think they should have gated this possibility behind collecting a certain something...

Reached the Garden, wandered around and solved maybe seven of the words before finding the dark area with the symbols on the pyramid tables.

Wandered through (I think) three rooms before ending up back at the start. Okay, I get it: learn what directions the symbols mean.

Idly tried one more time, clearly used The Force, and got all the way through to The Dark. Completely skipped all the Garden content.

The moral of the story? Never ever ever rely on something being 'a thousand to one against' when releasing a video game. Because one in every thousand players will experience that outcome.

reddit.com
u/whentheworldquiets — 14 days ago

How noisy is the inside of your head?

A while back I read a post from someone in a writing sub about how the inside of their head was "pretty quiet". I've also heard of aphantasia and anendophasia.

Personally, there is never a time when the radio in my head is not playing a song. I don't HAVE to narrate my thoughts, but I do find it easy to get wrapped up in mentally expressing and revising them if I don't have something occupying my immediate attention. Aphantasia, to me... It's like imagining a car driving past with no wheels. How is it doing that? Aren't wheels kind of fundamental? How could anyone function without a mind's eye?

I hear people talking about "switching off" but I suspect that's not something I ever actually do. I will go to bed, get comfy, and then pick something to think about that will eventually turn into a dream (which I realise if I get disturbed half way).

I just wondered where on this particular spectrum I fall.

reddit.com
u/whentheworldquiets — 1 month ago

Do any working, up-to-date samples exist for accessing the rear camera on mobile devices in a WebGL build? Any Unity version will do.

I'm trying to build a little hobby project for a tabletop RPG that uses QR codes. The idea is that players can use a companion WebGL app to scan the codes and obtain more details.

However, thus far I have been unable to persuade a WebGL build to even request access to my phone's cameras via

Application.RequestUserAuthorization(UserAuthorization.WebCam)

It just does nothing. I can't find any definitive, up-to-date guidance as to whether this is even supposed to be possible.

Thanks in advance!

reddit.com
u/whentheworldquiets — 2 months ago

[TOMT] [Action K-Drama][Last 5 years] Concerns a delinquent who ends up... qualifying? as some kind of supernatural guardian.

Several years ago now, on Netflix. Very affected, laid-back juvenile delinquent who everyone's scared of because he's so tough. Then he puts himself in harm's way to save someone from demons (?) and gets killed, but then comes back as a sort of supernatural guardian. Really really impressive action scenes.

reddit.com
u/whentheworldquiets — 3 months ago

Aspect of Dominance 2/2 imprinting as 1/2

Title says it all. I have 2/2 Aspect of Dominance, but imprinting it on boots only yields 1/2. Bug? Or am I missing something? Thanks!

EDIT: I was missing something - non-ancestral boots. I was not aware of this limitation. Thanks!

reddit.com
u/whentheworldquiets — 3 months ago