I thought i needed a 3D texture for each color since i have a red, green and blue value for each.
Do you mean something like that?
color_triplet table[256] = {{0,0,0}}; /* Initialize to all...
Type: Posts; User: M//Hax
I thought i needed a 3D texture for each color since i have a red, green and blue value for each.
Do you mean something like that?
color_triplet table[256] = {{0,0,0}}; /* Initialize to all...
I'm trying to use a color lookup table in shaders to convert rgb grayscale gl_Color to rgb color gl_Color. I want to use something similar to this : ...
Here two texture i found. Someone told me i could use them to transform the point sprite in real spheres using shaders. I'm able to use the texture in the shader and to see the point sprite as...
Well, now i have another problem, the texture of the sphere are showing correctly, but they are rotating with the user. I want to be able to move around the sphere, to see it change color and shadow.
Well, i'm not always able to translate text into code, so i generally need some example to be able to make it work!
Then you're not mapping the texture correctly.
Pulling off a textured sphere impostor requires selecting texture coordinates based on the view direction for that fragment. This is really just a...
I'm working on transforming a set of point sprites to sphere using a geometry shader (i found that it could be a good idea).
RIght now, the vertex and fragment shader are working, they make the...
Look like a good tutorial. I don't feel like reading another tutorial (read about 3 tutorials about directional lighting). I'm just playing with the code right now, hoping some miracle will happen!
ok so it should be something like that?
// pixel shader for rendering points as shaded spheres
const char *spherePixelShader = STRINGIFY(
uniform float pointRadius; // point size in world...
Like this ? :
// pixel shader for rendering points as shaded spheres
const char *spherePixelShader = STRINGIFY(
uniform float pointRadius; // point size in world space
varying vec3...
It is constant, relative to the position of the camera. Right now, The light is indeed following the camera. What i'm trying to do is the OPPOSITE.
I use point sprites to simulate alot of spheres, over 2 millions. Since it would be hard to render that many spheres using quads, i use point sprite, and use a shader to make them look like spheres....
That sounds like an even bigger bug. Admittedly, I haven't used point sprites much, so I don't fully understand the vagaries around them. But I don't understand how which inputs/outputs you use...
You made some pretty substantial changes to the code for something that is supposed to be following the tutorial. For example, the camera-space surface normal in the tutorial was passed as a varying...
I tried following this tutorial (http://zach.in.tu-clausthal.de/teaching/cg_literatur/glsl_tutorial/index.html#ogldir1) for implementing a directional light per pixel in my code, but it's just not...
That's a mobile quadro...I don't know if it's going to be able to do it. I'm using a Quadro FX 580, and i can easily draw 10Mils points. I never tried over that, but it would probably work. Maybe...
That's some good explanation. I'll try to look for some shadow mapping tutorials. Thanks again!
I can draw easily 4 Millions of points with a fps over 30 using vbo's and points. What graphic card are you using?
That's a good point hehe! Would it be hard to create shadow from the shader i'm using?
I understood all this. What i'm trying to do is something like uniform posEye but for the light position. I'll check your link.
uniform vec3 lightDir = vec3(0.577, 0.577, 0.577);
it's giving the same result. The specular light is following the user eye direction.
i will probably need an index array tho!
Why do you need a normal for a point sprite? Even color is unnecessary unless you want to tint your spheres. [/QUOTE]
Actually, i have no normals glfloat. But i need to call...
Here the code from the frag shader (how should i call pointLight to be fixed?)
// pixel shader for rendering points as shaded spheres
const char *spherePixelShader = STRINGIFY(
uniform float...
I'm only working with vertices, normals and colors element, no indices.