Check out NVidia's shaderperf tool. I believe it gives you a full dump of the compiled shader, though I'm not sure how many optimization options it has.
Type: Posts; User: gmeed
Check out NVidia's shaderperf tool. I believe it gives you a full dump of the compiled shader, though I'm not sure how many optimization options it has.
Just keep drawing. The previous drawings won't be cleared unless you ask for that.
Thanks for the reply. I tried using half-precision, but that didn't fix it. If you look at the numbers I posted a few replies ago, I've verified that my shader can do 450fps, and the unshaded...
Check the NVidia sdk, they've got just what you need: a parallax-mapping shader in glsl. Actually, I got curious and pulled out the code to check something else, so I might as well paste it in:
...
Yep, the area's the same. It's pretty easy to control since I'm just drawing a terrain on a regular grid. The only thing that's not straight triangle strips are some zero-area triangles that go from...
I've been hacking away at this problem for a while, and now I at least have a better idea of what the problem is, so I'll try describing it again. In trying to narrow it down I've eliminated my...
... and another update: I get this behavior even when I'm not using a vertex program.
Another update: 3DLabs' glsl verifier doesn't detect anything wrong with the code after I removed the consts.
Thanks for the const tip. I changed that.
About your first comment, though.
I think it's vertex-limited when it's acting really slow because the window size has no effect on the rendering, but...
Certain things in my frament shader make my program look like it's limited by the vertex shader!
First, here's the code:
vertex shader:
const float nrmTexCoordScale = 512.0;
void main(void)
{...
I haven't seen it done, either. You'd have to post a link.
Well, if you've still got this in your code: "glScalef(.05,.05,.05); // scale to 5%" ... .
Why don't you post a picture of the "distortion" problem.
Alright!
But there's nothing you can do about the distortion. If the far end of the beam weren't distorted, it'd be smaller than the near end :p
Now I'm not sure what look you're going for. What do you mean by "true" views? To me that means views like we have in the real world, where things do look smaller when they're farther away, but you...
Have you also looked at the gluOrtho2D function that def mentioned? The "receding" look you've described sounds exactly like perspective projection - the way we see things in the real world. To...
Check the tutorial link section on this site. Nehe has an especially wide range of tutorials, one of which happens to be drawing a terrain.
Oops, I guess you had it right. I just assumed the contours were were called 1d contours since they only depend on one variable - the height of the terrain.
One way to do this is to set up...
What are 2d contours?
(Since this is the advanced forum, I'm assuming you're not just asking about the basic contours explained in the red book.)
Unless you have a GF6800, _all_ code is executed, and the results from false branches are simply ignored.
Just a guess: this may be disallowed to avoid having to implement sqrt and other functions in the driver. In other words, the function may only exist on the gpu, but you're asking the driver to use...
On my GeForce 5900, a format of GL_FLOAT_R32_NV and a type of GL_FLOAT work fine. I don't know why yours isn't working, though. Does it help to request 32 bits instead of 16?
Edit: I misread your...
I don't think dorbie was recommending you cache all possible combinations. You could keep everything the way you have it now, except store each tile in a bigger texture. Then, when you need to use a...
I'm not sure what you're asking. I think for the purpose of interpolation, the center of each texel is used as the "location" of that texel.
Yes, that'll do it. (Actually, I think the minification...
Yep, that should do it. You might also want to try turning on filtering for that texture and sampling right between pixels in order to have the card average four pixels for you. For example, you...
Could you give us a little more info on how you're doing it now? Does this still happen with mipmapping disabled?