PDA

View Full Version : resource equivalence



paulc
01-22-2004, 03:27 AM
I'm currently in the process of designing a shader. The shaders used by this system could be as simple as a single texture or a full fragment program, the idea being that the system will decompose the list of shaders applied to a section of geometry into a number of passes. Each pass has a a limited number of resources, e.g. the number of texture units available. In the case of more advanced cards you can run a fragment program that over-rides any use of individual texture units, so that would constitute a single pass. Another pass could be one that simply applies a number of textures, the max number simply being the number of texture units on a card.

The case I'm unsure about is using register combiners, having not experimented with them. Is it possible to have a pass that uses register combiners on a number of texture units, while using remaining units with textures just bound to them? Considering this, is it possible to use a couple of units with basic textures and then run a fragment program, or is that not possible? - looks like the spec for fragment_program answers this:

(13) Which stages are subsumed by fragment programs?

RESOLVED: Texturing, color sum, and fog.

Nutty
01-24-2004, 04:42 PM
Is it possible to have a pass that uses register combiners on a number of texture units, while using remaining units with textures just bound to them?

If you use Register Combiners in any pass, then they are responsible for determining the final produced fragment. You cannot apply textures to that fragment outside of register combiners in the same pass.

I hope that answers your question, I couldn't fully understand what you're trying to get at.

Register Combiners is like a limited fragment program. All work to the fragment is done within them, and they only support upto 4 textures IIRC. With RC's enabled, all fragments will be processed by the RC's until it is disabled.

Nutty

paulc
01-25-2004, 08:11 AM
Yup, that clears things up.

I'm trying to create a system that will automatically render an object/triangle mesh with an arbitrary number of textures/RegComb effects/Fragment programs ('Shaders' in the context of the system) . The list of 'Shaders' are processed and converted into a number of passes depending on their different basic types. I just wasn't sure if Register combiners were totally exclusive like fragment programs.

cheers, Paul.