# Optimizations and improvements to our renderer

**URL:** https://forum.castle-engine.io/t/optimizations-and-improvements-to-our-renderer/260
**Category:** News
**Created:** [November 30, 2020, 8:17pm UTC](https://forum.castle-engine.io/t/optimizations-and-improvements-to-our-renderer/260 "2020-11-30T20:17:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)
#### Post date: [November 30, 2020, 8:17pm UTC](https://forum.castle-engine.io/t/optimizations-and-improvements-to-our-renderer/260/1 "2020-11-30T20:17:04Z")

</div>

| [![mousey_0](https://castle-engine.io/wp/wp-content/uploads/2020/11/mousey_0-200x113.png)](https://castle-engine.io/wp/wp-content/uploads/2020/11/mousey_0.png "mousey\_0") |

Last week we did an important fix for glTF skinned animation combined with normalmaps. It fixed the problem with incorrect lighting, but also made the code a little slower in case of skinned animation + normalmaps (we had to turn “off” one optimization). To counteract this, I’m reworking a relevant part of CGE renderer, to not only bring the old optimization back, but also optimize it even more, and bring other small improvements.

It’s a work-in-progress, but we already have:

1. Colors per vertex passing optimized (faster copy, 3/4 less data for RGB colors).

2. Custom shader attribute passing optimized (faster copy) and fixed for non-indexed primitives ([see demo file](https://github.com/castle-engine/demo-models/blob/master/compositing_shaders/attributes_various_primitives.x3dv)).

3. Tangents and bitangents passing optimized (pass 2/3 less data due to not duplicating normal info).

---

<div class="post-metadata">

### Author: ![RamazanGeven](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/ramazangeven/32/176_2.png) [@RamazanGeven](https://forum.castle-engine.io/u/RamazanGeven)
#### Post date: [December 1, 2020, 10:20am UTC](https://forum.castle-engine.io/t/optimizations-and-improvements-to-our-renderer/260/2 "2020-12-01T10:20:44Z")

</div>

where is dancer mousey\_0 files 🙂

---

<div class="post-metadata">

### Author: ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)
#### Post date: [December 1, 2020, 12:42pm UTC](https://forum.castle-engine.io/t/optimizations-and-improvements-to-our-renderer/260/3 "2020-12-01T12:42:40Z")

</div>

> where is dancer mousey\_0 files

On Discord and linked from [Bad normals in GLTF export · Issue #225 · castle-engine/castle-engine · GitHub](https://github.com/castle-engine/castle-engine/issues/225) . This is not mine model, and I don’t know the license – so it’s not a model we distribute with CGE.
