Jump to content
  • Advertisement
Sign in to follow this  
Paul Griffiths

GLSL: out array size too large?

This topic is 664 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!