Jump to content
  • Advertisement
Sign in to follow this  
stringa

GLSL error's - How to fix

This topic is 3652 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

Vertex Shader : shaders/car_shader.vert Output from shader : Vertex shader was successfully compiled to run on hardware. Fragment Shader : shaders/car_shader.frag Output from shader : Fragment shader failed to compile with the following errors : Compiler error: Sampler array indexes must be integral constant expressions Output from shader Fragment shader(s) were not successfully compiled before glLi nkProgram() was called. Link failed.

// --- car_shader.frag
// --- This is the main frag shader for car objects
// --- We will later add texture spatting and use it for terrain

// --- Preprocessor Defines

#define MAX_POINT_LIGHTS 7
#define NUM_SHADOW_SAMPLES 9


uniform sampler2DShadow Directional_Light;
uniform sampler2DShadow Point_Lights[ MAX_POINT_LIGHTS ];



[Edited by - stringa on August 18, 2008 2:50:32 PM]

Share this post


Link to post
Share on other sites
Advertisement
Change this
uniform sampler2DShadow Point_Lights[ MAX_POINT_LIGHTS ];

to
uniform sampler2DShadow Point_Lights[7];

and download Rendermonkey to test/debug your code its fast and easy to use.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!