Questions tagged [texture1d]
9 questions
4
votes
1 answer
Texture mapping using a 1d texture with OpenGL 4.x
I want to use a 1d texture (color ramp) to texture a simple triangle.
My fragment shader looks like this:
#version 420
uniform sampler1D colorRamp;
in float height;
out vec4 FragColor;
void main()
{
FragColor = texture(colorRamp,…

Vertexwahn
- 7,709
- 6
- 64
- 90
1
vote
1 answer
glTexCoordPointer output not as expected
I am trying to use glDrawElements , glTexCoordPointer and glTexImage1D to create a 1D texture, render a surface dataset and color the vertices according to their height value.
GLuint tex = 0;
My texture generation:
glGenTextures( 1, &tex…

tester
- 415
- 1
- 5
- 17
1
vote
1 answer
1D Texture lookup table with fixed function pipeline
I want to create a 1D texture with OpenGL's (old) fixed function pipeline, which interpolated through three colors.
After looking online: glTexImage1D is commonly referred to. I cannot find any good simple sample codes for this, and I wouldn't know…

tester
- 415
- 1
- 5
- 17
1
vote
1 answer
GLSL texture1D versus texture2D
I have a very simple question:
It seems that accessing a sampler1D, via texture1D(), is slower than accessing a sampler2D, via texture2D. Is it right ?

mike
- 55
- 6
0
votes
1 answer
Sampling unsigned integers from 1D texture using integer texture coordinates
I want to pass a big array of unsigned short tuples (rect geometries) to my Fragment Shader and be able to sample them as-is using integer texture coordinates, to do this I'm trying with a 1D texture as follows, but get just blank (0)…

Ivan Nikolaev
- 327
- 1
- 12
0
votes
0 answers
Unwanted Shimmering Effect with 1D Texture on Lines
I am trying to apply 1D texture to lines. It works but lines shimmer. I don't want this shimmering effect. Like on the picture.
I've also added a video about shimmering problem:
Shimmering Problem Video
How can I solve this problem? I am adding…

Veysel Bekir Macit
- 145
- 2
- 11
0
votes
1 answer
Creating and reading 1D textures in OpenGL 4.x
I have problems to use 1D textures in OpenGL 4.x.
I create my 1d texture this way (BTW: I removed my error checks to make the code more clear and shorter - usually after each gl call a BLUE_ASSERTEx(glGetError() == GL_NO_ERROR, "glGetError…

Vertexwahn
- 7,709
- 6
- 64
- 90
0
votes
1 answer
OpenGL texture1D
I'm trying to read from a fragment shader a texture1d:
uniform sampler1D world;
...
texelFetch(world, 0, 0);
I upload w, where w[0]=123.0f w[1]=123.0f...:
glActiveTexture(GL_TEXTURE0);
glGenTextures(1, &pt->world);
glBindTexture(GL_TEXTURE_1D,…

dv1729
- 987
- 1
- 8
- 25
-1
votes
1 answer
How to matrix inversion For 1 Dimension with c code?
hello i used gauss jordan for 1d but i didnt
i want to find 1d matrix inverse. I found determinant but i dont know inverse of this matrix
Hello my dear friends
Our matrixes:
double A[] = {6, 6 ,2, 4, 9 ,7, 4, 3 ,3};
double B[] = {6, 6 ,2, 4, 9…
user13418390