Blender Git Loki

Git Commits -> Revision f4bd416

Revision f4bd416 by Dalai Felinto (master)
August 18, 2017, 10:21 (GMT)
Fix ubo vec3 alignment issue

This fixes the Principled shader in Eevee, among other nodes.

Basically before we were treating all the vec3 as vec4 as far as memory
goes. We now only do it when required (aka, when the vec3 is not
followed by a float).

We can be even smarter about that and move the floats around to provide
padding for the vec3s. However this is for a separate patch.

That said, there seems to be some strong consensus in corners of the
internet against using vec3 at all [1]. Basically even if we get all the
padding correct, we may still suffer from poor driver implementations in
some consumer graphic cards.

It's not hard to move to vec4, but I think we can avoid doing it as much
as possible. By the time 2.8 is out hopefully most drivers will be
implementing things correctly.

[1] - https://stackoverflow.com/questions/38172696

Commit Details:

Full Hash: f4bd416b342ba840b5c3660526e0a938b7730cce
Parent Commit: 6fe38bf
Lines Changed: +25, -6

1 Modified Path:

/source/blender/gpu/intern/gpu_uniformbuffer.c (+25, -6) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021