• Advertisement
Sign in to follow this  

resource views

This topic is 3870 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

Can someone explain resource views? If I have a texture, why can't I just set that texture as a render target? If I set a texture as a render target, isn't it obvious I am using the texture data as a render target? I don't see why the API requires you to create a resource view first. Also, the SDK seems to imply that with a resource view you can cast your texture so that it can be used for different things. Is this like a runtime cast? I don't see why someone would want to change what the backbuffer texture is for, or why someone would want to cast the depth/stencil texture to something else.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Quat
Is this like a runtime cast?
I also think at it like "some sort of cast" - but it's nothing really like it. The goal of views is to provide a quick, valid description of how the GPU should interact with the data source/sink.
More than "casting" the resource itself, it tells the HW "how to cast" its data to fit in / to be unpacked.
The cool thing is that once this "cast description" is completed, it'll always work - and this is where the thing gets necessary for speed.

You know in d3d10 it's all about cbuffers and tbuffers for resources - it doesn't sound strange this sounds like a "cast to inherited object type" operation.

Quote:
Original post by Quat
I don't see why someone would want to change what the backbuffer texture is for, or why someone would want to cast the depth/stencil texture to something else.
The backbuffer could become the source of a tonemapping operation.
The depth/stencil surface could become a shadowmap.
Both are extremely common nowadays.

Share this post


Link to post
Share on other sites
Quote:

The backbuffer could become the source of a tonemapping operation.
The depth/stencil surface could become a shadowmap.
Both are extremely common nowadays.


Okay, I just figured the API could figure it out based on what you are doing. In Direct3D9, you would just render into the shadowmap, and then use it as a texture--no resource views.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement