opengl - GLSL Shader Compiles On An Older Computer But Not Another -


The 'texture' function returns an error while compiling this shader on one computer, but not on any other. The OpenLL version on which Shader's compilation is 3.1. Another computer running OpenGL 4.1, however, will not compile with these errors. Error: C1105: Can not call a non-function 0 (58): Error C1105: can not make a non-function -

We looked online, but could not find the answer. The documentation says that 'texture2D' and 'shadow2D' will work as a replacement, but 'Shadow2D' indicates an error that it was removed after GLSL version 140, even though the OpenGL reference in the compiling program is 3.1. My understanding was that the graphics cards were backwards compatible for the previous GSL versions.

Here is the problem shader:

  # version 140 in vec3 state; Vec2 in texCoord; Vec3 in general; VC3 General View_vs; Out vec3 normal Shadow_vs; Out vec3 eyeView_vs; Vec3 lightDirView_vs out; Vec2 texCoord_vs out; Out vec4 shadowCoord_vs; Uniform Mat 4 World Metrics; Uniform matte 4 view matrix; Uniform Unmatched 4 Model Projection Metrics; Exclude Uniform 4 Depth Models Process Matics; Uniform vec3 sun direction; Const metal 4 bias matrix = matte 4 (0.5 f, 0.0 f, 0.0 f, 0.0 f, 0.0 f, 0.5 f, 0.0 f, 0.0 f, 0.0 f, 0.0 f, 0.5 f, 0.0 f, 0.5 f, 0.5 f , 0.5 F, 1.0 F); Zero main (zeros) {eyeView_vs = - (View matrix * Vizmatrix * VC4 (Position, 1.0F)). Xyz; LightDirView_vs = (Visual Metrics * VC4 (Sun Direction, 0.0F)). Xyz; NormalShadow_vs = (Depth Modal Processmatics * VC4 (Normal, 0.0f)). Xyz; NormalView_vs = (View Matrix * Vermatronics * VC4 (Normal, 0.0F)). Xyz; // Note: Only if the world does not scale the matrix model! Use the inverted location if not, then Gl_Position = Model projection matrix * VC4 (position, 1.0F); TexCoord_vs = texCoord; ShadowCoord_vs = Bias matrix * Depthmodelprogrammatics * VC4 (Position, 1.0F); }  


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -