Jump to content

View more

Image of the Day

Adding some finishing touches...
Follow us for more
#screenshotsaturday #indiedev... by #MakeGoodGames https://t.co/Otbwywbm3a
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

GLSL: out array size too large?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 paulgriffiths   Members   

-96
Like
0Likes
Like

Posted 22 February 2017 - 08:38 AM

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, 22 February 2017 - 11:01 AM.


#2 paulgriffiths   Members   

-96
Like
0Likes
Like

Posted 22 February 2017 - 04:52 PM

 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, 22 February 2017 - 04:53 PM.





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.