   Make Pixelated Rendering
  Hello everyone, I posted a question a couple of days ago about getting a grayscale rendering for a security camera and somebody suggested on also downsampling and adding noise to it to make a more real effect. Now, I have no idea on how to do that?Does any body know how to make a pixelated render on purpose?Thanks.   
  Try rendering your scene to a low resolution texture (say, 128 x 128), and then draw the texture to a full-screen quad.Here's an image of two houses (with different materials) drawn to screen:Here's an image of the same two houses drawn to a low resolution texture, which is then rendered to a full-screen quad:;  Thank you but, can you give me some sample code so I can see where this values are edited... because I want to be able to toggle them.   ;Quote:Original post by mvtapiaThank you but, can you give me some sample code so I can see where this values are edited... because I want to be able to toggle them.My project uses an OpenGL/CgFx/SAS combination, so I doubt the code itself would be of much use to you.  :pThe only difference in the two images shown in my previous post is the CgFx effect (post-process) currently in use.  The top image is a simple render scene to 512x512 texture and then draw full screen quad; the lower image draws the scene to a lower resolution (I think 32x32) texture instead.  To get the two different results, I've changed .cgfx files using the CgFx API.Here's a copy of the second method's effect file; I had to remove lots of debug stuff and some comments, so it's not very pretty.  Also remember that you won't be able to copy-paste this anyway: I'm using OpenGL, CgFx, and a really crappy implementation of DXSAS (due to the DirectX team not sending me a copy of the recent specs when I asked for it).float Script : STANDARDSGLOBAL<string ScriptClass = "scene";string ScriptOrder = "postprocess";string ScriptOutput = "color";string Script = "Technique=t0;";> = 1.0;float4 Black : DIFFUSE = {0.0,0.0,0.0,1.0};float ClearDepth = 1.0;//////////////////////////////////////////////////////////////////////////////////////// Render-to-Texture Data /////////////////////////////////////////////////////////////////sampler2D SceneTexture : rendercolortarget<string Format = "RGB8";int Width = 32;int Height = 32;>;///////////////////////////////////////////////////////////////////////////////////////////////////// programs /////////////////////////////////////////////////////////////////////struct QuadVertexOutput{   float4 Position: POSITION;   float2 UV: TEXCOORD0;};QuadVertexOutput ScreenQuadVS(float3 Position : POSITION, float3 TexCoord : TEXCOORD0 ){   QuadVertexOutput OUT;   OUT.Position = float4(Position, 1.0);   OUT.UV = TexCoord.xy;   return OUT;}float4 TexQuadPS(QuadVertexOutput IN) : COLOR{   return tex2D(SceneTexture, IN.UV);}/////////////////////////////////////////////////////////////////////////////////////////////////// techniques /////////////////////////////////////////////////////////////////////technique t0<string ScriptClass = "scene";string ScriptOrder = "postprocess";string ScriptOutput = "color";string Script ="ClearSetColor=Black;"   // Set black background and"ClearSetDepth=ClearDepth;"  // appropriate depth    "RenderColorTarget0=SceneTexture;" // Draw the scene to downsampling texture"Clear=Color;" // clear color and depth"Clear=Depth;""ScriptExternal=color;"  // draw the scene"Pass=p0;";    // Draw the downsample texture to the screen as a full-screen textured quad>{    pass p0    <   string Script = "RenderColorTarget0=;Draw=Buffer;";    >    {  VertexProgram = compile arbvp1 ScreenQuadVS();    FragmentProgram = compile arbfp1 TexQuadPS();    }}