Vertex count exceeds 16-bit index limit if shadows enabled

Problems building or running the engine, queries about how to use features etc.
Post Reply
Piotrek
Gnoblar
Posts: 13
Joined: Thu Mar 05, 2015 6:01 pm
Location: Poland

Vertex count exceeds 16-bit index limit if shadows enabled

Post by Piotrek »

Hi,
I have created Mesh in Mogre 1.7 using vertex buffer and 32bit index buffer and I am getting assertion int file OgreShadowCaster.cpp line 222:

'Expression: v1 < 65536 && v0 < 65536 && (v0 + originalVertexCount) < 65536 && "Vertex count exceeds 16-bit index limit!'

It only appears when shadow technique is set to SHADOWTYPE_STENCIL_MODULATIVE.
Is this a bug? Can I force shadows to use 32bit buffers?
Piotrek
Gnoblar
Posts: 13
Joined: Thu Mar 05, 2015 6:01 pm
Location: Poland

Re: Vertex count exceeds 16-bit index limit if shadows enabl

Post by Piotrek »

Can someone help me with that?
User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2703
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 51

Re: Vertex count exceeds 16-bit index limit if shadows enabl

Post by syedhs »

If I am not mistaken, you cannot have 32 bit indices meshes with stencil shadow. Consider splitting up your meshes so that all them use 16 bit indices.
A willow deeply scarred, somebody's broken heart
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me
Post Reply