Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 21 Mar 2003
Offline Last Active Oct 29 2015 05:47 AM

Topics I've Started

fragment texture sampler for vector3 field

11 June 2014 - 04:17 PM

Heyup guys, 


I was wondering if there is an efficient way to use a texture sampler to sample through a vector3 2-dimensional array, from within a GLSL fragment shader.


A bit of background :


I'm looking at ray marching algorithms (a-la ShaderToy), while using an Oculus DK1. 


I want to sample an 2D array of 3D vectors (representing the screen space 960 x 800, 2D will be enough, although will require a re-normalisation), to quickly look up the ray direction (and position, although the computation is trivial enough) for each fragment, taking into account the barrel correction required. I'm not sure if that is feasible with current tech.


The advantage is it does away with the need to create a large back buffer, applying a large post-process distortion mesh, and wasting a whole lot of fragment computations in the process. 

Oculus Rift SDL2 code sample

16 September 2013 - 04:17 PM

Hey guys and gals,


For anyone interested, present or future, in the Oculus Rift, but found it hard to get going through the samples and their various layers of encapsulation, I've made a short-(ish) little implementation demo. 




It's a 1,000 lines of code, uses OpenGL + SDL2 as the framework, implements the distortion filter, sensor inputs and most of the goodies. 



shl, bitshifting by 32 bits, does nothing. nothing!

21 December 2012 - 08:37 AM

003BDCFB  mov         eax,dword ptr [outword] 
003BDCFE  mov         ecx,dword ptr [out32] 
003BDD01  mov         edx,dword ptr [ecx+eax*4] 
003BDD04  mov         ecx,dword ptr [outarea] 
003BDD07  shl         edx,cl 


slightly bit puzzled, I am bitshifting by 32 bits, which effectively would clear the variable (edx) to 0x00000000, but shl actually does nothing at all. edx remains unchanged (EDX = 0xfdfdfdfd).

Just double chekcing that's the expected behaviour, or am I reading this wrong? Gonna have to change my logic :(

Visual Studio 9 search results steal keyboard focus

04 December 2012 - 06:57 AM

Just something that annoys me mildly.

I may start a 'find in files' search, which will take a while, and then I'll be doing some other stuff in the editor window in the meanwhile, and all the sudden the focus shifts to the Find Window when the search completes. Any way to stop VS doing that? I didn't find any options in the tools-> options menu, maybe someone who is equally crossed with this found a way to stop this frankly pointless behaviour.

[web] Getting DOM from URL with Chrome extensions

07 March 2011 - 05:18 PM

I'm writing a fairly basic Chrome extension, where I parse the content of a web page.

I'm a bit new to this, Javascripts, content scripts and extensions, but I need to download the content of a particular web page and parse it. I'm stuck at getting the actual content of the web page from within a script query.

I'm sure this is a pretty common thing web developers run into, I'm just really not familiar with web dev.

var req = new XMLHttpRequest();
req.open("GET", "http://www.google.com", true);
req.onload = parseXML;
req.onerror = showError;
req.onabort = showAbort;