OpenGLRenderer

Global

Back to menu

Analyse First, then optimize : Where are we bottle neck ? Enemies ? Physics ? AI ? Frame Rate vs Frame Time (much better for details) // – Todo : ARRAY MD HERE

Bottleneck

Cpu : Draws Call Vertex Shader : too many vertices to process from object space to NDC / Screen projection coordinate Fragment : too complexe shaders
Deffered : Put things in a GBuffer and then calculate lights in a second pass (Color, rhougness, normal, metallic and other if needed) Complexity of lighting seppareted from complexity of the geometry ! But large memory (GBUFFER), less shader diversity, no transparent ?

Forward : Each object light itself (each object can have a diffrent light model, less VRAM, baack to front rendering (transparency)) + fast But bad for complex scenes Attention : transparent with a lot off light can be expensive

Opaque : Deffered, so no lighting data in shader complexity ! Transparent : Forward, so lighting calculation are here

Pick Your Targets

Min CPU? GPU ? Console ? … Know the hardware – Fit the audience aswell + TARGET FRAME RATE (60 at least for PC ) Learn the hardware : How many polygons for our target FPS, how many draw call, post-processing cost ? metrics relationships ? –> Fill the screen with meshes, do test for thoses Set content budgets :

CPU Bounds with High Draw Call (Probably our case) – Reducing Draw Calls

CPU Bound with Low Draw Calls

GPU Bounds (Video 6)

https://www.youtube.com/watch?v=hjjodpsZ70Q

Pix : GPU Profiler (7)

8 - Optimize from Analysis with Pix

9 - Draw Call Optimization with Pix

10 - Shader Optimization

Summary