Sign in to follow this  

GLSL error's - How to fix

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


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
Change this
uniform sampler2DShadow Point_Lights[ MAX_POINT_LIGHTS ];

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

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