• Advertisement

Archived

This topic is now archived and is closed to further replies.

Shader Development

This topic is 5103 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I had two things about this post.... First off, are vertices with shaders (vertex shaders only) only allowed to be effected by the shaders? What I mean is, can I texture map/light a polygon with vertex shaders (applied to it already) using the fixed function pipeline, or do all effects on a shaded poly have to be done using the shader language? I tried making lesson 47 do a polygon, OpenGL-lighted wave instead of a line unshaded one, but no luck. I don''t think its the code, but it could be. Also, I would like to know what people are thinking about the future of shaders. If you have something neat to share, please do. Is it worth all the hype?? Are they really that much better than the fixed-function line? What languages do people use? Cg, GLSL(GLslang), DirectX''s HLSL, Others? What do you think about the Hardware Vendor''s strategies for shader use? How are shader development relations? What is one of the coolest use of shaders people have seen? What are some other questions/answers/info people have about shaders?

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by Steve132
I had two things about this post....

First off, are vertices with shaders (vertex shaders only) only allowed to be effected by the shaders?

What I mean is, can I texture map/light a polygon with vertex shaders (applied to it already) using the fixed function pipeline, or do all effects on a shaded poly have to be done using the shader language?

I tried making lesson 47 do a polygon, OpenGL-lighted wave instead of a line unshaded one, but no luck. I don''t think its the code, but it could be.




?¿? :-)

quote:
Original post by Steve132
Is it worth all the hype?? Are they really that much better than the fixed-function line?



Yes!! You have FULL (ok, nearly full) control about what happens with each vertex and each fragment! There a thousands of effects that can be done with shaders.

quote:
Original post by Steve132
What languages do people use? Cg, GLSL(GLslang), DirectX''s HLSL, Others?



DX HLSL - Microsoft Direct3D shading language, compiled by MS DX HLSL compiler, different shader versions
Cg - shading language developed by nVidia
GLSL - official OpenGL sahding langauge, developed by 3DLabs

If you stick to OpenGL I''d recommend you to take GLSL.
DX HLSL is quite impossible to use with OpenGL (would be ironic... :-)
Cg is a quite good language but it isn''t a part of OpenGL.

GLSL is in a quite early stage stage and there are still some bugs in driver implentations but looking at the OpenGL ARB meetings I think that ARB is really motivated to push GLSL to a REALLY good shading language (there are still some specification problems).

quote:
Original post by Steve132
What are some other questions/answers/info people have about shaders?



What do you want to know?

--------------------------------------------------------

There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.

There is another theory which states that this has already happened...

Share this post


Link to post
Share on other sites
Idk, well, personally I was always wondering how I can get started working with GLSL (I can''t find any good information at all!)

However, I was just sorta wanting to start a general discussion thread about shaders in general... see what people had to say about them... so post stuff interesting!

Share this post


Link to post
Share on other sites
Well, here''s my question then:

In _DarkWIng_''s demo there is a fragment program extension used (to do bumpmapping, i believe it was a NV extension), which one is it and how do i use it (as ARB fragment programs aren''t supported by my ti4200), and, are there ways of using unsupported extensions (like, are they simulated by certain drivers or are there reasonable emulators available)?

Share this post


Link to post
Share on other sites
@Tree Penguin: I used ARV_VP and NV_RC for bumpmapping on GF4. As for how to use it: Look at nVidia dev pages. They have tons of stuff about it. The only usefull SW emulation is ARB_VP on GF1&2. Don''t expect to do SW ARB_FP at more than 1FPS

@Steve132: try this page for start. It has some nice examples of GLSL use.

You should never let your fears become the boundaries of your dreams.

Share this post


Link to post
Share on other sites
I love using CG, mostly because its easy to use and can compile down to(at run-time) OpenGL or DX ASM. Alsp there is tons of info at developer.nvidia.com about them.

Share this post


Link to post
Share on other sites
quote:
Original post by SarsDP
I love using CG, mostly because its easy to use and can compile down to(at run-time) OpenGL or DX ASM. Alsp there is tons of info at developer.nvidia.com about them.


And it even has it''s own website and a LOT of unofficial ''fansites''.

Darkwing: thanks, that was pretty useful to me, so, if i get it right:
GL_NV_register_combiners is an extension allowing you to do several fragment-based operations (i even saw normal expanding ), but not as low level as fragment programs. Am i right?

Share this post


Link to post
Share on other sites
quote:
Original post by Tree Penguin
Darkwing: thanks, that was pretty useful to me, so, if i get it right:
GL_NV_register_combiners is an extension allowing you to do several fragment-based operations (i even saw normal expanding ), but not as low level as fragment programs. Am i right?

Something like that. It performs a very small subset of what ARB_FP can do. The problem is that you have to hardcode the shader into code or use something like NV_parse. If you limit yourself to GF3+ you can combine it with NV_TS to do a bit more(replace bumpmapping with fake offset mapping for example).

As for language selection I prefer GLslang over Cg and DX/HLSL.


You should never let your fears become the boundaries of your dreams.

Share this post


Link to post
Share on other sites
Vertex programs bypass that entire section of the pipeline.
All that really needs to be done is transform them into clipspace. I also use them to pass values to fragment programs. You can do a ton of other stuff too.

BTW, I use ARB vertex and fragment programs, so its all ASMesque for me

Share this post


Link to post
Share on other sites
It's probly the same, allthough i do suspect that there are still some fixed pipeline stuff still in there.
The FX cards do have some pretty impressive shader functions, and i havn't even begun to explore it's full potential yet.
Mostly because i use GLSLang shaders and GLSLang support is pretty much beta for FX cards.

But i am going to start to fiddle with multiple alpha channels, perhaps even some color matrices(weird theory on this but works something like regular vertex matrices but on the color/alpha channel, could be usefull) and a new way of doing shadowmapping.

---------------------------------
For an overdose of l33tness, flashbang.nu

[edited by - lc_overlord on March 5, 2004 4:10:08 PM]

Share this post


Link to post
Share on other sites

  • Advertisement