Jump to content
  • Advertisement
Sign in to follow this  
begemot

apply filters by second pass in effect

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

Hi! Help me please to resolve the next problem.
I have source picture in YUV format, saved in ARGB texture. In my effect in first pass I transform it. It is ok.

But if my picture will be resized, it looks very poorly(((((((
So, I think I need apply any filters to my result image. How I can do it?

I try set parameters as

[font=Consolas][size=2][font=Consolas][size=2]device.SetSamplerState(0, [/font][/font][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af]SamplerState[/font][/font][/font][font=Consolas][size=2][font=Consolas][size=2].MinFilter, [/font][/font][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af]TextureFilter[/font][/font][/font][font=Consolas][size=2][font=Consolas][size=2].Linear);[/font][/font]
[font=Consolas][size=2][font=Consolas][size=2]device.SetSamplerState(0, [/font][/font][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af]SamplerState[/font][/font][/font][font=Consolas][size=2][font=Consolas][size=2].MagFilter, [/font][/font][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af]TextureFilter[/font][/font][/font][font=Consolas][size=2][font=Consolas][size=2].Linear);[/font][/font]
[font=Consolas][size=2][font=Consolas][size=2]device.SetSamplerState(0, [/font][/font][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af]SamplerState[/font][/font][/font][font=Consolas][size=2][font=Consolas][size=2].MipFilter, [/font][/font][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af]TextureFilter[/font][/font][/font][font=Consolas][size=2][font=Consolas][size=2].Linear);[/font][/font]

but they effects on source texture and my result image is very very bad.

How I can apply filters only after first pass?

One way was in getting image after first pass, creating sampler in effect as
[font=Consolas][size=2][font=Consolas][size=2]texture rT2;[/font][/font]
[font=Consolas][size=2][font=Consolas][size=2]sampler resultTex2 = sampler_state[/font][/font]
[font=Consolas][size=2][font=Consolas][size=2]{[/font][/font]
[font=Consolas][size=2][font=Consolas][size=2]Texture = (rT2);[/font][/font]
[font=Consolas][size=2][font=Consolas][size=2]MinFilter = LINEAR;[/font][/font]
[font=Consolas][size=2][font=Consolas][size=2]MagFilter = LINEAR;[/font][/font]
[font=Consolas][size=2][font=Consolas][size=2]MipFilter = LINEAR;[/font][/font]
[font=Consolas][size=2][font=Consolas][size=2]};[/font][/font]
and start second simple pass)
If it is a good way, how I can get image after first pass and put it to sampler?

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!