Question by
Nirvan · Apr 11, 2021 at 06:09 PM ·
gpuinstancing
DrawMeshInstanced is not giving specular highlights
I am searching and can't find answear. I am trying to render transparent texture with high smoothness and metallicness to simulate water I am using mesh instancing but with it I get no specular highlights on mesh normals. What I am missing?
No light affect clearly visible: https://imgur.com/a/NxfZjXs
My code:
// Not Instanced
//for (int i = 0; i < splatMx.Count; i++) Graphics.DrawMesh(SplatMesh, splatMx[i], SplatMaterial, 0, null, 0, pr, UnityEngine.Rendering.ShadowCastingMode.Off, true);
// Instanced
Graphics.DrawMeshInstanced(SplatMesh, 0, SplatMaterial, splatMx, pr, UnityEngine.Rendering.ShadowCastingMode.Off, true, DrawLayer, null, UnityEngine.Rendering.LightProbeUsage.BlendProbes);
Comment
Your answer
Follow this Question
Related Questions
GPU Instancing objects disappearing 1 Answer
DrawMeshInstanced has bad perfomance on some Android devices 0 Answers
Which one to believe? 0 Answers
Making a custom shader use GPU Instancing? 1 Answer
PostLateUpdate.FinishFrameRendering 2 Answers