Nick [D]vB Posted March 30, 2011 Share Posted March 30, 2011 (edited) Hi rica, I saw your post on doom9 but will reply here until you have time to start a new thread. Great work getting the script to load in DGDecNV, I will test it as soon as I have some time. I was going to register and reply in your thread here: http://neuron2.net/board/viewtopic.php?f=8&t=110&start=10 ...but those guys did not seem very helpful anyway! Edited March 30, 2011 by Nick [D]vB Quote Link to comment
ricabullah Posted March 30, 2011 Share Posted March 30, 2011 (edited) vB' timestamp='1301518895' post='332590']Hi rica, I saw your post on doom9 but will reply here until you have time to start a new thread. Great work getting the script to load in DGDecNV, I will test it as soon as I have some time. I was going to register and reply in your thread here: http://neuron2.net/board/viewtopic.php?f=8&t=110&start=10 ...but those guys did not seem very helpful anyway! Self service or help yourself. But it's a joke; neuron2 is always polite and helpful. I believe he had really no time to have a look my trial scripts. Best. Edited April 1, 2011 by ricabullah Quote Link to comment
Nick [D]vB Posted April 1, 2011 Share Posted April 1, 2011 Hi, I have done some quick tests with the scripts you posted on neuron2.net but I have not been able to get them working yet, sometimes I have had some output but it is very slow and corrupted, also it still shows anaglyph colors, but most of the time I just get black output with 100% CPU and massive memory usage of the player (700MB+). Other Cuda programs are working so I will do some more tests with very simple scripts to check DGDecNV is working ok. Maybe I have to change something in DGIndexNV? I will do some more tests soon, please let me know if you have any ideas? Thanks. Quote Link to comment
ricabullah Posted April 1, 2011 Share Posted April 1, 2011 (edited) I hope i will add the new thread this Sunday. Meanwhile you may test this basic script with VirtualDubMod or GraphStudio: LoadPlugin("C:\DG\DGDecodeNV.dll")DGSource("E:\TEST\3D.dgi") info() Preventing to use multiple instances of DGDecoderNV just change the first three lines of AnaExtract.avs: LoadPlugin("C:\DG\DGDecodeNV.dll")vidOrig = DGSource(anaglyphName) vidL = vidOrig _ _ _ _ Edited April 1, 2011 by ricabullah Quote Link to comment
ricabullah Posted April 16, 2011 Share Posted April 16, 2011 FYI New thread: http://forum.doom9.org/showthread.php?t=160434 And the script modified by myself: http://forum.doom9.org/showpost.php?p=1490698&postcount=12 __ _ _ _ _ _ Quote Link to comment
decameronus Posted October 6, 2011 Share Posted October 6, 2011 Hi I had my yellow-blue 3d glasses, anaglyph edit and publish by these colors are happy, site function Quote Link to comment
hackbart Posted August 5, 2012 Author Share Posted August 5, 2012 The following shader converts a Side By Side stream to Stereoscopic 3D: sampler s0 : register(s0); float4 main(float2 tex : TEXCOORD0) : COLOR { tex.x = tex.x / 2; if (frac(tex.y*540)>0.5) tex.x = tex.x + 0.5; return tex2D(s0, tex); } Christian Quote Link to comment
madsilence Posted August 12, 2012 Share Posted August 12, 2012 (edited) Hi, Christian Hackbart. I own the LG D2342P polarized monitor, so I use the HDMI graphics card output and HDMI monitor input. That kind of system works well at all but normaly I need to exchange left and right eyes in the MONITOR's menu to obtain the correct stereo effect. Some time ago I noted that exchanging eyes from the monitor's menu causes font distortions (try exchange eyes from monitor's menu an take a look on the desktop WITHOUT POLARIZAD GLASSES and you'll see a font distortion) so I tried to exchange eyes by software (F7 into the Stereoscopic Player). The only thing I need in DVBViewer is a shader that exchanges left and right halfparts of half-Side-By-Side image. 1. Could you guide me how to create such kind of shader? 2. Another kind of shader that I need is to extend left or rigth parts (only left or only right) of hSBS image and see it like 2D-image movie without glasses. 3. Is there any GENERAL manual about how to create your own shader on the net? I took a look into the ../shaders folder and see that shader is a C-style function but I haven't understood what are the input and output variables and how it works. Could you explain this a little bit? Thanks in advance. Edited August 12, 2012 by madsilence Quote Link to comment
dvbrewer Posted August 12, 2012 Share Posted August 12, 2012 The following shader converts a Side By Side stream to Stereoscopic 3D: sampler s0 : register(s0); float4 main(float2 tex : TEXCOORD0) : COLOR { tex.x = tex.x / 2; if (frac(tex.y*540)>0.5) tex.x = tex.x + 0.5; return tex2D(s0, tex); } Christian can you confirm a 3D monitor & glasses are needed for this? Quote Link to comment
Rittberg Posted September 9, 2012 Share Posted September 9, 2012 (edited) The following shader converts a Side By Side stream to Stereoscopic 3D: sampler s0 : register(s0); float4 main(float2 tex : TEXCOORD0) : COLOR { tex.x = tex.x / 2; if (frac(tex.y*540)>0.5) tex.x = tex.x + 0.5; return tex2D(s0, tex); } Christian Ok, Finally I copy the above mentioned lines to notepad, giving the extension "xml" and copy to the shader folder . Tried it with 3D channels but it seems that something is wrong with the code. Please check it by recording few minutes from a 3D SbS channel and try to play it with DVBViewer, You didn't get the a 3D picture. To understand what I mean, please play this file with the Stereoscopic Player from : http://www.3dtv.at/Products/Player/Index_en.aspx To see how the file should be. I watch 3D by emitter & Universal Home/Pro 3D LCD Shutter Glasses Rittberg Edited September 9, 2012 by Rittberg Quote Link to comment
Imbalanced Zero Posted September 14, 2012 Share Posted September 14, 2012 (edited) Hi, Christian Hackbart. I own the LG D2342P polarized monitor, so I use the HDMI graphics card output and HDMI monitor input. That kind of system works well at all but normaly I need to exchange left and right eyes in the MONITOR's menu to obtain the correct stereo effect. Some time ago I noted that exchanging eyes from the monitor's menu causes font distortions (try exchange eyes from monitor's menu an take a look on the desktop WITHOUT POLARIZAD GLASSES and you'll see a font distortion) so I tried to exchange eyes by software (F7 into the Stereoscopic Player). The only thing I need in DVBViewer is a shader that exchanges left and right halfparts of half-Side-By-Side image. 1. Could you guide me how to create such kind of shader? 2. Another kind of shader that I need is to extend left or rigth parts (only left or only right) of hSBS image and see it like 2D-image movie without glasses. 3. Is there any GENERAL manual about how to create your own shader on the net? I took a look into the ../shaders folder and see that shader is a C-style function but I haven't understood what are the input and output variables and how it works. Could you explain this a little bit? Thanks in advance. Try this post: http://www.DVBViewer...s-to-interlace/ Or from above: Change the tex.x = tex.x + 0.5 to tex.x = tex.x*0.5 (i think) Edited September 14, 2012 by Imbalanced Zero Quote Link to comment
LocalHolgi Posted September 17, 2012 Share Posted September 17, 2012 tex.x = tex.x*0.5 - Are you sure? The Texturerange is in between 0 and 1. You already divided the position to the half and if you multiply it again with 0.5 you get 1/4 of the original position. This does not seem correct. Quote Link to comment
hackbart Posted April 22, 2013 Author Share Posted April 22, 2013 According to the Oculus Rift SDK i created the following shader script. It should run, but i don't have such a device for testing //========================================= // Name: Oculus Rift Shader // Author: Christian Hackbart //========================================= sampler s0 : register(s0); float4 p0 : register(c0); #define ScreenCenter float2(0.5, 0.5) #define LensCenter float2(0.5, 0.5) #define Scale float2(0.35, 0.35) #define ScaleIn float2(2,2) #define HmdWarpParam float4(1.0, 0.22, 0.24, 0) float2 HmdWarp(float2 in01) { float2 theta = (in01 - LensCenter) * ScaleIn; // Scales to [-1, 1] float rSq = theta.x * theta.x + theta.y * theta.y; float2 rvector = theta * (HmdWarpParam.x + HmdWarpParam.y * rSq + HmdWarpParam.z * rSq * rSq + HmdWarpParam.w * rSq * rSq * rSq); return LensCenter + Scale * rvector; } float4 main(float2 tex : TEXCOORD0) : COLOR { float xOffset = 0; float2 clampOffset = float2(0.5,0.5); tex.x = tex.x * 2; if (tex.x > 1) { tex.x = tex.x - 1; xOffset = 1; } float2 tc = HmdWarp(tex); if (any(clamp(tc, ScreenCenter-clampOffset, ScreenCenter+clampOffset) - tc)) return 0; tc.x = (tc.x + xOffset) / 2; return tex2D(s0, tc); } Quote Link to comment
ybeouwulf Posted August 28, 2013 Share Posted August 28, 2013 According to the Oculus Rift SDK i created the following shader script. It should run, but i don't have such a device for testing //========================================= // Name: Oculus Rift Shader // Author: Christian Hackbart //========================================= sampler s0 : register(s0); float4 p0 : register(c0); #define ScreenCenter float2(0.5, 0.5) #define LensCenter float2(0.5, 0.5) #define Scale float2(0.35, 0.35) #define ScaleIn float2(2,2) #define HmdWarpParam float4(1.0, 0.22, 0.24, 0) float2 HmdWarp(float2 in01) { float2 theta = (in01 - LensCenter) * ScaleIn; // Scales to [-1, 1] float rSq = theta.x * theta.x + theta.y * theta.y; float2 rvector = theta * (HmdWarpParam.x + HmdWarpParam.y * rSq + HmdWarpParam.z * rSq * rSq + HmdWarpParam.w * rSq * rSq * rSq); return LensCenter + Scale * rvector; } float4 main(float2 tex : TEXCOORD0) : COLOR { float xOffset = 0; float2 clampOffset = float2(0.5,0.5); tex.x = tex.x * 2; if (tex.x > 1) { tex.x = tex.x - 1; xOffset = 1; } float2 tc = HmdWarp(tex); if (any(clamp(tc, ScreenCenter-clampOffset, ScreenCenter+clampOffset) - tc)) return 0; tc.x = (tc.x + xOffset) / 2; return tex2D(s0, tc); } Hi, i got my Oculus Rift a few days ago. But with this shader i can not get a 3d effect on for example Sky 3d or Astra 3d Demo Channel. One reason is that the Picture is to big. So first i changed the size of the picture to fit better for the oculus rift display: #define Scale float2(0.625, 0.95) Now there is another Problem that the 2 rendered Pictures are each centered in the MIddle of their Screen side. This does not Match the Middle of the Oculus Rift Screen for left and right side. Then there is no 3d effect. The 2 Rendered Pictures need to be closer together to the Middle of the Screen. I need to move the left Picture more to the right and the right picture more to the left. Do you have any hints for me to achieve this? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.