Sign in to follow this  
no.Oby

Solid image redrawing

Recommended Posts

no.Oby    104

Hello.

I am writing a yuy2 to rgb converter in shader.

I put yuy2 data in texture [w/2:h] and drawing on rec [w:h] with shader, which execute decode function.  

Current:

https://docs.google.com/file/d/0BxcY1BqDH3QnTEx4TkhYUGlid1U/edit?usp=sharing

Goal:

https://docs.google.com/file/d/0BxcY1BqDH3QnMVZkZGZ2d180aDQ/edit?usp=sharing

I think that when i draw yuy2 texture on bigger rectangle data deforms. Which Params should i use in SB.Begin and SB.Draw for currect (with filling of adjacent pixels) drawing texture i heard thats called "Solid"?

Share this post


Link to post
Share on other sites
phil_t    8084

Pass SampleState.PointClamp or SampleState.PointWrap (probably the former in your case) for the second parameter in SpriteBatch.Begin.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this