shaders & the fixed/programmable pipeline

Tech-Archive recommends: Fix windows errors by optimizing your registry




Hi,

I currently use the fixed-function pipeline and have been reasonably
happy with it so far, but I want to get into more advanced lighting
with shaders. Is it straightforward enough mixing the programmable
pipeline with the fixed? I'll explain what I'd like to do.

I have a class for every object that represents an object in the 3D
world, and other classes that those objects might rely upon. For
instance, a class for a face, cube, triangle, staircase etc and also
classes for textures, materials (which can be linked to textures) and
so on.

The texture class has rendering properties associated with it, so when
I do a rendering pass for all objects with a particular texture, the
correct rendering properties are set based upon the texture class. I'm
thinking that all I need to do is create a Shader class, which will
have a name and some code attached to it, and I can link the Shader
class to the Texture class (in the same way that I link a Material
class to the Texture).

When I come to render the texture, if the texture has a shader
associated with it then I can use the shader (and the programmable
pipeline), and if it doesn't, then I can continue to use the
fixed-function pipeline as I have been doing all along.

Is it possible to mix and match the two pipelines without doing a major
rewrite?

Thanks,

Richy

.



Relevant Pages

  • Re: data-flow / interaction of application, vertex-shaders, pixel-shaders, cull/clip/pro
    ... >> the pixel shader apply the appropriate texture-images to triangles? ... > pixel shader samples the texture, the right texel is fetched, ... I transform to camera coordinates to cull all backface triangles ...
    (microsoft.public.win32.programmer.directx.graphics)
  • accessing constant buffers, shader resources, etc.
    ... I'm new to D3D10 and am having some trouble/confusion resolving some of the basic functionality with shader resources. ... I'd like to have a texture array and a constant buffer available from the vertex shader, then another texture array for the pixel shader. ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: data-flow / interaction of application, vertex-shaders, pixel-shaders, cull/clip/pro
    ... deliver the right texture coordinates, the pixel shader samples the texture, ... before rendering if it can. ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: glClipPlane precision
    ... shader programming extensions, sure. ... This means there are something like 150,000 texture ... The 3-dimensional texture coordinates ... are the model-space vertex normals transformed by the rotation ...
    (comp.graphics.api.opengl)
  • Re: glClipPlane precision
    ... shader programming extensions, sure. ... I guess it's an OpenGL version issue, ... This means there are something like 150,000 texture ... plane each vertex is and so calculate a texture coordinate based on ...
    (comp.graphics.api.opengl)