Scaling with nearest pixel / disable all smoothing?

merry christmas everybody!

how do i avoid all smoothing/blending/anti aliasing when scaling (and just use nearest pixel)?

my setup is a little weird so i guess i should give some background info: basically i try to emulate a room full of screens with a very high resolution - so i built a cylinder (in which the camera/user moves around) onto which i map the screen content via dx9texture. this screen content itself is a flat image consisting of litte more then a bunch of quads and some text.
my problem now is, that if the user/camera moves very close to the cylinder wall examining it close-up, it always looks kinda blurred - the lines as well as the text.

  • i disabled anti aliasing in both render nodes and the text layers.
  • also i added filter (EX9.SamplerState) to the quads in the screen content but this did not seem to do anything.

any help is appreciated a lot!

Filter (EX9.SamplerState) is also set to point?
When you happen to look at the textures at an angle and things get blurry,
try forcing anisotropic filtering in the GPU setings (on nvidia cards it would be nvidia control panel)

samplerstate should be set to Point interpolation in shader or in filter node for fixedfunction nodes (quad dx9 for instance) or in dx11 it’s much nicer as samplerstates are exposed from shader code into vvvv and you can set those without editing shader code, and there’s no fixed function shenanigans.

hi you two,
thanks for helping!
i played around with the nvidia settings and filtering node and though it did get slightly better the initial problem still persits. i’m quite new to vvvv though, so i think maybe i’m just missing something really obvious… i did a stripped down version of my patch and a screengrab of the result, see below. why are these edges (font and quads alike) soft?

again, thanks so much for your help!

scalingdemo.v4p (28.9 KB)

see microdee´s reply again.
The constant shader has no sampler state pin. Since this node takes your big texture , thats the place you would be supposed to connect the filter node (not at the upper nodes). You will need to set the filtering yourself in the shader code of constant (EX9.Effect). Just clone the constant template from the node browser (strg + click) and edit the Mip/Min/MagFilter lines at the beginning to interpolate by POINT not LINEAR:

sampler Samp = sampler_state    //sampler for doing the texture-lookup
    Texture   = (Tex);          //apply a texture to the sampler
    MipFilter = LINEAR;         //sampler states
    MinFilter = LINEAR;
    MagFilter = LINEAR;

you guys rock!!!
problem solved. only the font is still a little blurry but i think this hast to do with the font itself and also is not crucial for what i try to do right now…
again, even if i should repeat myself: thank you so much!!!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.