Unity Mobile racing game shader practice @colinleungNiloCat
Unity Mobile racing game shader practice  @colinleungNiloCat
Uploaded September 2016 | Updated September 2026, 1 week ago
After playing mobile racing game "Need for speed no limits", I decided to create this demo to test if this kind of graphics is practical using Unity.The main focus of this demo is realtime cubemap reflection on mobile, which appears on the car & road's wet surface.The method I used allows both car & road sample the same cubemap render result, although the reflection on the car is not correct(only the road's reflection is correct), but I found that it is faster & still acceptable in a racing game

This demo runs @ stable 30FPS on HTC desire 805(GPU=Adreno 305, opengles3, 720p),

if using a lower resolution framebuffer & lower resolution realtime cubemap, it can run @ stable 60FPS.

One important optimization is pushing world space reflection vertor's calculation from fragment shader to vertex shader, it requires pre-tessellated mesh(road & car) to calculate acceptable reflection, but since the road cover large portion of the screen, the time saved from fragment shader's reflection vector calculation is huge.

Also cubemap rendering using a lower resolution can increase performance a lot.

see how the reflection probe(realtime cube map)'s position affect the final reflection result:
imgur.com/l4AGakl
Unity Mobile racing game shader practiceUnity PC Vertex perlin wave shader.Single pass analytical AO + soft shadow spheres (0 RenderTexture needed)[NiloToonURP] blue archive miku render test 1[Unity Toon Lit Shader for URP (WIP)] auto hair 2D shadow on face[NiloToonURP] Blue Archive Shun unity URP render test[NiloToon Unity URP shader] Girls Frontline 2 Exilium (2023 CBT3) - MP7 Cheeta renderingUnity - OpenGL ES 2.0 - runtime GPU lightmap baking for procedural terrain[Unity Toon Lit Shader for URP (WIP)]  Tree shadow and physics testUnity URP character NPR ShaderUnity PC  Mandelbrot set shaderNiloToonURP Android Anime Dancing Demo .apk
colin leung (NiloCat) |

Unity Mobile racing game shader practice

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER