Jump to content

Convert 3D to 2D


jcomas

Recommended Posts

It seems stupid but If you have a 3D video (left and right sides) and you need watch without glasses you can use this shader:

 

<?xml version="1.0" encoding="iso-8859-1"?>

<Shader>

<Profile>ps_2_0</Profile>

<Description>left side</Description>

<Code>sampler s0 : register(s0);

 

float4 main(float2 tex : TEXCOORD0) : COLOR

{

tex.x = tex.x / 2;

 

float4 l = tex2D(s0, tex);

 

float red = l.r;

float green = l.g;

float blue = l.b;

 

return float4(red, green, blue, 1);

}</Code>

</Shader>

 

Copy left_side.xml file to shaders folder of DVBViewer program folder. Suggestions and corrections are welcome, I don't know HLSL programming.

 

Programming Guide for HLSL:

http://msdn.microsoft.com/en-us/library/bb509635(v=VS.85).aspx

left_side.xml

Edited by jcomas
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...