Jump to content
  • Advertisement
Sign in to follow this  
Nitish Tripathi

OpenGL Weird tessellation shader error

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

Hi!

I am relatively new to GLSL. I wrote a GLSL code including tessellation shaders which was working fine on my NVIDIA machine but is giving a weird error on my Radeon (5650) machine, both using openGL version 4.1.

The error that it gives on radeon machine is as follows,

ERROR: 0:16: error(#202) No matching overloaded function found texture2D
ERROR: 0:16: error(#160) Cannot convert from 'const float' to 'highp 4-component vector of float'



The code for my tessellation shader is as follows,

#version 400 compatibility
#extension GL_ARB_tessellation_shader : enable
//#extension GL_NV_shader_buffer_load : enable (TURNING OFF ON RADEON MACHINE | IS KEPT ENABLED ON NVIDIA)

uniform sampler2D Data;
layout (quads) in;

void main (void)
{
float u;
float v;
u = 10 * gl_TessCoord.x;
v = 10 * gl_TessCoord.y;
vec2 st = vec2 (gl_TessCoord.x, gl_TessCoord.y);
st = vec2 (0,0);
vec4 col = texture2D (Data, st);
float w = col.x;

gl_Position = gl_ModelViewProjectionMatrix * vec4(u, v, w, 1);
}

I'll appreciate any help that I can get on this.

Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
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!