Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


begemot

Member Since 25 Apr 2012
Offline Last Active Jul 12 2012 04:46 AM

Topics I've Started

apply filters by second pass in effect

10 July 2012 - 06:05 AM

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

device.SetSamplerState(0, SamplerState.MinFilter, TextureFilter.Linear);
device.SetSamplerState(0, SamplerState.MagFilter, TextureFilter.Linear);
device.SetSamplerState(0, SamplerState.MipFilter, TextureFilter.Linear);

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
texture rT2;
sampler resultTex2 = sampler_state
{
Texture = (rT2);
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = LINEAR;
};
and start second simple pass)
If it is a good way, how I can get image after first pass and put it to sampler?

transfer byte[] to effect

26 April 2012 - 02:51 AM

I have byte array of image's data (or pointer).
I have effect with pixel shader to fill result texture. I want to work with my image data in pixel shader without unnecessary transformations.
How I can transfer bytes array to my Effect and how I must define it in HLSL program?
I'm using SlimDX and C#.
Help me,please!!!

PARTNERS