TA Log

Dynamic Link Library

Unity automatically compiles our code in Editor, but compiling code first is usually the way in the development. Using dll ensures that accidental editing will not happen during the development, but it also means direct editing is impossible, which makes development harder.

How to create dll files is easy:

  1. create a ClassLibrary in IDE
  2. Add source code
  3. Add reference. Unity’s referenced files are in the Editor directory and project’s library directory.
  4. Build the solution.

URP

unity_FogParams: for fog calculation

It’s possible to edit the URP code to open certain interfaces, like renderer data, render feature, so that the game can control the render feature during the runtime.

For example, Universal Render Pipeline Asset could return the render data. Render Data (ScriptableRendererData) could return a list of render feature. Then we can disable or activate certain render features.

Shader

texture’s coordinates precision should be float.

https://forum.unity.com/threads/strange-pixel-offset-uv-float-precision.633211/