• Advertisement
Sign in to follow this  

GLSL: out array size too large?

Recommended Posts

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.

Edited by paulgriffiths

Share this post


Link to post
Share on other sites
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.
Edited by paulgriffiths

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Advertisement