GLSL: out array size too large?

Started by
0 comments, last by Paul Griffiths 7 years, 2 months ago

I'm trying to use this: out vec3 TangentLightPos[48];

the shader compiler is saying it's too large.

How do I get around this?

Should I be using Buffer Objects?

It's for parallax self shadowing with multiple lights, I have fixed my parallax, normal mapping & shadows in my engine but need parallax self shadowing too:

parallax3.jpg

parallax2.jpg

parallax.jpg

Thanks.

Advertisement

Found the answer with storage buffer objects:


layout(std430, binding = 0) buffer ssbo
{
    vec3 TangentLightPos[];
};
set easely like:

for (int i = 0; i < totalLights; i++)
  TangentLightPos[i]  = ...
Think this is the way to go as I'm using opengl 4.3 anyways.

This topic is closed to new replies.

Advertisement