|
|
Fragment shaders
Hi!
How much per-vertex data can I pass to the vertex/fragment shader from
OpenGL application?
More precisely: I'm displaying images with changable brightness/contrast
which I want to realise using fragment shaders. Additionally, I want to
change texture's pallette on the flight (I cannot use OpenGL's standard
pallette mechanisms, because image is very large (~4kx3k px) and I cannot
afford to load it frequently from buffer to texture) One solution is to pass
pallette into shader, but luckily pallettes can be evaluated procedurally
inside shader, so I haven't to share that data. However, possibly more image
parameters will be passed, and I want to know the upper limit :)
Best regards -- Spook.
|
|
0
|
|
|
|
Reply
|
Wojciech
|
6/26/2009 6:53:04 AM |
|
> How much per-vertex data can I pass to the vertex/fragment shader from
> OpenGL application?
It's implementation dependent and can be queried using glGet
(glGetIntegerv):
vertex shader:
GL_MAX_VERTEX_UNIFORM_COMPONENTS (in float units)
GL_MAX_VERTEX_ATTRIBS (in attributes)
fragment shader:
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS (in float units)
GL_MAX_VARYING FLOATS (in float units)
- Tom
|
|
0
|
|
|
|
Reply
|
Tom
|
6/26/2009 7:45:00 AM
|
|
Tom Burger wrote:
>> How much per-vertex data can I pass to the vertex/fragment shader
>> from OpenGL application?
>
> It's implementation dependent and can be queried using glGet
> (glGetIntegerv):
>
> vertex shader:
> GL_MAX_VERTEX_UNIFORM_COMPONENTS (in float units)
> GL_MAX_VERTEX_ATTRIBS (in attributes)
>
> fragment shader:
> GL_MAX_FRAGMENT_UNIFORM_COMPONENTS (in float units)
> GL_MAX_VARYING FLOATS (in float units)
Thanks for quick reply!
Do you know, if the OpenGL specification state, what is the minimum value
for each element?
> - Tom
Best regards -- Spook.
|
|
0
|
|
|
|
Reply
|
Wojciech
|
6/26/2009 9:06:04 AM
|
|
> Do you know, if the OpenGL specification state, what is the minimum value
> for each element?
vertex shader:
GL_MAX_VERTEX_UNIFORM_COMPONENTS - 512 floats
GL_MAX_VERTEX_ATTRIBS - 16 attributes
fragment shader:
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS - 64 floats
GL_MAX_VARYING FLOATS - 32 floats
- Tom
|
|
0
|
|
|
|
Reply
|
Tom
|
6/26/2009 1:37:57 PM
|
|
Uzytkownik "Tom Burger" <t.burger@mimicmedia.nl> napisal w wiadomosci
news:600f81ab-dac3-4f44-aa6b-cd86ceff8fa8@q37g2000vbi.googlegroups.com...
>> Do you know, if the OpenGL specification state, what is the minimum value
>> for each element?
>
> vertex shader:
> GL_MAX_VERTEX_UNIFORM_COMPONENTS - 512 floats
> GL_MAX_VERTEX_ATTRIBS - 16 attributes
>
> fragment shader:
> GL_MAX_FRAGMENT_UNIFORM_COMPONENTS - 64 floats
> GL_MAX_VARYING FLOATS - 32 floats
Thank you very much :)
> - Tom
Best regards -- Spook.
--
! ._______. Warning: Lucida Console sig! //) !
! || spk || www.spook.freshsite.pl / _ """*!
! ||_____|| spook at op.pl / ' | ""!
! | ___ | tlen: spoko_ws gg:1290136 /. __/"\ '!
! |_|[]_|_| May the SOURCE be with you! \/) \ !
|
|
0
|
|
|
|
Reply
|
Wojciech
|
6/26/2009 9:49:22 PM
|
|
|
4 Replies
120 Views
(page loaded in 0.116 seconds)
Similiar Articles: GLSL, fragment shader, shadow2D and texture unit - comp.graphics ...Hi! I'm currently writing a shader that compute shadow using depth map texture. While I have something working when I use my depth map in the textur... Example code of fragment shader and Mesa 6.0 - comp.graphics.api ...Hi, I have downloaded Mesa 6.0 but could not find any example code illustrating fragment shader. Is there any example source illustrating fragme... ARB_fragment_program vs ARB_fragment_shader - comp.graphics.api ...Hello, What is the difference between ARB_fragment_program and ARB_fragment_shader? Also, are there OpenGL implementations for linux that support th... arb fragment shader fog program - comp.graphics.api.opengl ...I'm trying to get fog working with an existing volume renderer which uses an arb fragment shader. I've added to my code: .... glEnable(GL_FOG); glFog... GLSL - screen coordinate & texture width - comp.graphics.api ...Hi, I have 2 questions about GLSL fragment shaders: - How can I get the x,y position of the pixel on screen I'm rendering to? - Can I get the width... How does a single GLSL shader use a texture unit that can be 2D ...However, troubles appear when I try to use the textures in a GLSL fragment shader. I've used an uniform variable to specify the texture mode I want to use: 0 for no ... Image processing the frame buffer under OpenGL - comp.graphics.api ...> Basically I want to be to write real-time video effects code, > which involves processing each pixel in the frame. > > Would fragment shaders help? number of texture units on GeForce 6800 - comp.graphics.api.opengl ...arb fragment shader fog program - comp.graphics.api.opengl ... number of texture units on GeForce 6800 - comp.graphics.api.opengl ... I am rewriting my renderers to be ... Cards with partial GLSL support - comp.graphics.api.opengl ...I'm going to enter the world of GLSL for the first time in my life. It seems there're quite a few cards which support GL_ARB_fragment_shader but don't... GL_POINTS & Textures - comp.graphics.api.openglI am hoping that (and you seem to suggest > that it does work) that if I use a fragment shader I can apply a piece > of texture to the GL_POINT so that it is "textured ... Shader - Wikipedia, the free encyclopediaThis allows graphics cards to make more efficient use of processing power. Pixel shaders. Pixel shaders, also known as fragment shaders, compute color and other attributes of ... Vertex and Fragment Shaders | Adobe Developer ConnectionReview the diagram above and notice how Vertex and Fragment Shaders constitute strategic blocks in the pipeline. When you are rendering a geometry, you'll have a ... 7/21/2012 12:03:59 AM
|
|
|
|
|
|
|
|
|