Menu
  • HOME
  • TAGS

OpenGL - translation stretches and distorts sprite

c++,opengl,transform,translation,distortion

Matching OpenGL, GLM stores matrices in column major order. The constructors also expect elements to be specified in the same order. However, your translation matrix is specified in row major order: glm::mat4 trans = glm::mat4( 1.0f, 0.0f, 0.0f, translation.x, 0.0f, 1.0f, 0.0f, translation.y, 0.0f, 0.0f, 1.0f, translation.z, 0.0f, 0.0f, 0.0f,...

OpenGL ES 2.0 GLSL Barrel Distortion Shader not working

opengl-es,glsl,shader,distortion

You apply the distortion effect in the vertex shader. So all you are doing is moving the 4 corners of those spheres. You can't achieve the desired effect that way. Threre are different options. You theoretically could use some higher tesselation for your squares, so you just create a 2D...

javascript library to perspective distort a drawing [closed]

javascript,drawing,javascript-library,distortion

In Raphael just apply a matrix, I show you an example made with a set of 2 different types of draws: var R = Raphael(10,150,200,140); var r = R.rect(0,0,200,100).attr({fill: "red"}); var p = R.path("M0,50h200"); var s = R.set(); s.push(r); s.push(p); s.transform("m1,0.2,0,1,0,0"); The second value is the X skew, it will...

Webgl Distortion in Chrome with three Monitors

google-chrome,firefox,webgl,distortion

The issue with Chrome is it's got a limit on the size a canvas can be. This is part of the WebGL spec although arguably Chrome should fix it. You can try to encourage them to fix it here. The specific issue is that the WebGL spec says that even...

Objects distort if near the canvas sides - three.js

camera,three.js,distortion

There will always be some distortion, but it is worse with a large camera field-of-view (fov). A reasonable value for camera.fov is 40-45 degrees. A smaller value would produce less distortion. camera = new THREE.PerspectiveCamera( fov, aspect, near, far ); And for reference, camera.fov is the field-of-view in the vertical...

CSS displaying differently on a live website than it did on Codecademy [closed]

html,css,distortion

You're missing a pixel value on line 54 of your css file - that seems to resolve it. .imagelist p { padding-left: 80px; position: relative; top: -60px; } Also, within your html file (line 46) you have <div class="Contact"> which should read : <div class="contact"> CSS classes are case sensitive...

USB Audio, distortion in low bits

matlab,audio,usb,audio-recording,distortion

I solved my problem.. The problem was caused by the application i used to record the data, and the method i used.. I used Audacity, which supports the old windows MME audio API, and the DirectSound API. These are relatively high-level API's apparently, and are the cause of the distortion....

Rectify an Image with Matlab's “camerParams” (Computer Vision System Toolbox)

image,matlab,camera-calibration,matlab-cvst,distortion

If you are using one of the calibration images, then all the information you need is in the cameraParams object. Let's say you are using calibration image 1, and let's call it I. First, undistort the image: I = undistortImage(I, cameraParams); Get the extrinsics (rotation and translation) for your image:...

How do Google create the distortion effect on the Google Ideas homepage?

javascript,animation,distortion

It's not that hard, especially with html2canvas and canvas-glitch. Basically you just need to convert the DOM element to canvas, and then manipulate the image data to achieve the glitch effect. And with these two libs, that task becomes quite trivial. html2canvas(node, { onrendered: function (canvas) { // hide the...

How to efficiently find and remove 1 pixel bands of image intensity changes?

image-processing,edge-detection,distortion,sobel

I assume that you have lines of 1 pixel width in your image that are brighter or darker than their surroundings and you want to find them and remove them from the image and replace the removed pixels by an average of the local neighborhood. I developed an algorithm for...

what ist the correct Oculus Rift barrel distortion radius function?

javascript,image-processing,filter,distortion,oculus

After trying a lot of stuff... i finally got the solution. The trick was to normalize r first and then multiply the barrelfunction with orginal r var sf = pr / rMax; //Scaling factor var newR = pr*(0.24*Math.pow(sf,4)+0.22*Math.pow(sf,2)+1); //barrel distortion function See fiddle here: http://jsfiddle.net/s175ozts/4/ Result: ...