How to Profile Unity WebGL Based Application on Your Browser ?

Posted on Tue 30 January 2024 in misc

Let's set the scene. You have a Unity application. It goes smoothly in Unity Editor, but when built in WebGL, embedded into your web page, and feed up with real data, it starts to slow down. How to profile that ?

Using Chrome profiler

Long story short, run your app in …


Continue reading

How to do Graphical Tests in Unity ?

Posted on Wed 15 November 2023 in misc

Introduction

Certain tests cannot be conducted solely by comparing the return value of a function, particularly when custom shaders are in use. In such scenarios, it becomes necessary to perform comparisons based on screenshots. Fortunately, Unity offers some tools to do so, using the Unity's Graphics Tests Framework.

Graphics Tests …


Continue reading

How to Handle Double Precision Coordinates in Unity ?

Posted on Fri 08 September 2023 in misc

Like most of 3D/Game engines, Unity works with single float precision coordinates. As it is not an issue for most use cases, this may be a problem when you deal with geographical coordinates or very large world. Let's see how to handle this problem using the Unity's High Precision …


Continue reading

Improve Your Unity Asset Usability With Samples

Posted on Thu 01 June 2023 in misc

No one read the documentation.

It is the sad truth. You have developed the most awesome Unity asset, using the most advanced state of the art ray-casted-signed-distance-field-backed-layer-based-mipmap-inspired-linear-fading technic, but no-one understands how to use it. So you wrote a documentation. But people won't read it. Because no one read the …


Continue reading

How to locate DICOM in space

Posted on Tue 20 December 2022 in misc

I've worked in medical domain from time to time since 2010, especially to display DICOM images, and if I had a dollar every time I heard “This picture is upside down”, I think I could have bought a sandwich. Yes, that's not so frequent but when it happens, it quickly …


Continue reading

The Problem of Floating Point Precision in Opengl, Vulkan and 3D in General - Part 3

Posted on Mon 04 April 2022 in misc

We have seen in the previous article how to handle position of object and camera in very large scene. But this still won't solve the shaky problem caused by matrix accumulation. We will here see that only a few place needs to use double precision, and not all your rendering …


Continue reading

The Problem of Floating Point Precision in Opengl, Vulkan and 3D in General - Part 2

Posted on Mon 28 March 2022 in misc

We have seen in a previous article why floating point representation may shake our objects in scene. We will now see how to use space change tricks to mitigate this problem.

A brief reminder about World, Model and View space

When dealing with 3D coordinates, we generally use 3 coordinate …


Continue reading

The Problem of Floating Point Precision in Opengl, Vulkan and 3D in General - Part 1

Posted on Mon 21 March 2022 in misc

When zooming a lot on 3D objects or when having small object lost in a very large scene, it can happen that your objects "jiggle" from one position to another, making rendering really shaky. We will see in this series of article where does it comes from and how to …


Continue reading