From e234ce9b2272323ef2666d3f0718ecb8c688b693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Tue, 9 Oct 2018 17:32:13 +0200 Subject: Eevee: Add support/Fix Object Info node Caveat: Random output does not yet work with instance (dupli) objects. --- source/blender/draw/intern/draw_manager.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/draw/intern/draw_manager.h') diff --git a/source/blender/draw/intern/draw_manager.h b/source/blender/draw/intern/draw_manager.h index 5916b45aa27..bba98f5e102 100644 --- a/source/blender/draw/intern/draw_manager.h +++ b/source/blender/draw/intern/draw_manager.h @@ -101,6 +101,7 @@ enum { DRW_CALL_NORMALWORLD = (1 << 5), DRW_CALL_ORCOTEXFAC = (1 << 6), DRW_CALL_EYEVEC = (1 << 7), + DRW_CALL_OBJECTINFO = (1 << 8), }; typedef struct DRWCallState { @@ -122,6 +123,7 @@ typedef struct DRWCallState { float normalview[3][3]; float normalworld[3][3]; /* Not view dependent */ float orcotexfac[2][3]; /* Not view dependent */ + float objectinfo[2]; float eyevec[3]; } DRWCallState; @@ -140,6 +142,7 @@ typedef struct DRWCall { union { struct { /* type == DRW_CALL_SINGLE */ GPUBatch *geometry; + short ma_index; } single; struct { /* type == DRW_CALL_RANGE */ GPUBatch *geometry; @@ -257,6 +260,7 @@ struct DRWShadingGroup { int orcotexfac; int eye; int callid; + int objectinfo; uint16_t matflag; /* Matrices needed, same as DRWCall.flag */ #ifndef NDEBUG -- cgit v1.2.3