- Home /
Standard tree shader; disable translucency?
I'm a graphic/level designer in a company where we have to go optimization first all the time.
I was googling for ways to optimize our software even more and I run into an article that said translucent materials are heavy to render. We have many trees in our outdoor scenes and the trees have always been the biggest bottleneck for us. I realized that the standard tree shader is using translucency, so is it possible to disable it? Or is there any light weight substitutes for the standard shader?
TL:DR; Is it possible to disable translucency from the tree shader to increase performance?
Thanks in advance!
Answer by tanoshimi · Jul 05, 2016 at 06:33 AM
You have complete control over the shaders used by materials to render any object in the scene. If you're going for micro-optimisation, you can write custom shaders that only include exactly those features you need. You can download the source of the builtin shaders from https://unity3d.com/get-unity/download/archive as a starting point and edit them as appropriate.
However, I'm a bit confused by your reference to translucency. As far as I'm aware, trees are opaque and drawn using the geometry rendering queue. Leaves are billboarded and drawn using alpha cutoffs and possibly partial transparency, but that's fairly standard unless you want to model individual leaves in your modelling program?
Your answer
Follow this Question
Related Questions
Rendering full-screen gradient background without overdraw? 1 Answer
How to setup Shader Variant Collection 0 Answers
Shader / Material Refreshing, AssetBundles, and dynamic batching issues 0 Answers
Punching holes through a texture and making them regenerate back again in an efficient way 0 Answers
Axis oriented BRDF 0 Answers