As far as i know ,it is impossible. Because GPU can not generate any new vertex without any input data. Only geometry shader can generate new vertex according to your input data.
Type: Posts; User: apapaxionga
As far as i know ,it is impossible. Because GPU can not generate any new vertex without any input data. Only geometry shader can generate new vertex according to your input data.
You are right,Thank you。 i found that code
In the OpenGL SDK 10's example :Instanced Tessellation,i found the fellowing GPU code, i do not understand the meaning of vertices[%d]. What is the actual size of vertices array?
%d equals to...
it works!i should use glDisable(GL_LiGHTING) after rendering the teapot to the FBO. So the light will not affect the screenAlignQuad!
the display function should be like this:
void display()
{
...
Yes , i have tried that. The total code is here,the GPU part can be neglected.
well,i change the position of glClear,but it did not work.
i turn on the light in the initial stage, the problem now is that the light still works,but it is dark than the scene without using FBO.
i render a scene including a teapot and ambient light .Without using fbo the whole scene seems ok!When i using fbo to render the scene into a texture,the whole scene become dark but the light still...
oh!thank you !you are right!
i was learning raycasting ,i do not understand some alpha blending code in the fragment shader . Can some one explain this to me ?Why "3" have to be mutiplied ?It is different from the classic...
i encounter this error:fatal error C9999: Bad scope in ConvertLocalReferences()
i have updated video card driver using 267.24 which is the lastest driver, but i still get that error.Do someone...
Thanks a lot. it helps me lot!
Is there any GPU-based shadow map tutorial which contains source code ?
GL_FLOAT is still the same.
So why how can i make the scene brighter ? what changes should i make?
i want to keep the depth information of the scene in a texture.i use FBO to keep the depth information.However nothing appeared. Can someone help me figure out why?
CG code:
FBO code:
...
i render a scene including a teapot and ambient light .Without using fbo the whole scene seems ok!When i using fbo to render the scene into a texture,the light become dim. Why?
When i was learning Depth peeling . i confused with the fellowing code,The texture comparison mode is GL_COMPARE_R_TO_TEXTURE_ARB
Texture buffer texture[0] contains the contents of the depth...
The code is one sample called Depth Peeling in the NVIDIA OpenGL SDK. The function of this shader is to discard the fragment which fail the GL_COMPARE_R_TO_TEXTURE .it use the fragment.xy to be the...
uniform sampler2DRectShadow shadow;
r0keeps the fragment position ,then r0 is used as the texcoord parameter of shadow2DRect. However r0's x and y component value can be negative,can texcoord be...
Thank you very much ,i have learned this kind of assembly language in Shader Assembly Language (ARB/NV) Quick Reference Guide for OpenGL®
First of all,Thank you for your reply .
You mean that the first argument of the "TEX" instruction is the texture coordinate. However R0.x is just a float variable, Can it be the texture coordinate...
this assembly code found in the Depth Peeling 2 Demo in the OpenGL SDK, i think these assembly code plays a role in depth peeling .
i do not know why using "TEMP R0" because it seems that R0...
what should the assembly language code looks like using glsl?
i found these code in an example ,it seems that its fouction just like fragment shader.Do any document can help me learn this kind of assembly Language? or can someone tell me the meaning of the...